Nutanix administrators often need to modify the Nutanix Controller VM (CVM) hostname or Nutanix CVM name displayed in Prism on AHV cluster.
Changing the hostname helps in DNS resolution, whereas renaming the CVM affects only its identification within Prism.
Since these changes are command-line driven, it’s essential you should follow the correct procedure to avoid running production workload disruptions.
To change Nutanix CVM’s (Controller VM) / Nutanix CVM hostname is possible through command line only.
Understand Nutanix CVM Hostname vs. CVM Name
Understanding how to manage Nutanix CVM effectively is essential for optimal performance.
Before diving into the steps, let’s clarify the key differences:
- CVM Hostname: This is the NetBIOS name associated with the CVM’s IP address
- It should be registered in the DNS server to resolve IP to hostname and hostname to IP address.
- DNS lookup command: nslookup and dig command can help to resolve CVM hostname
- CVM Name: This is the display name visible in Nutanix Prism but has no impact on DNS resolution
- Best Practice: Keep CVM hostname and CVM Name same to avoid any confusion
Why Change the Nutanix CVM Hostname?
Changing the Nutanix CVM hostname is crucial for maintaining a well-structured and efficient virtualized environment.
A correctly configured hostname ensures seamless communication within the cluster,
simplifies VM management, and helps prevent potential errors caused by inconsistent naming.
- Ensures proper DNS resolution within the cluster
- Helps with better VM management and organization
- Prevents unexpected errors caused by incorrect naming conventions
Change CVM hostname on AHV Cluster
Changing CVM hostname is supported on Nutanix AHV cluster to make human friendly and can be registered for DNS records.
Utilizing the Nutanix CVM correctly can enhance your virtualization experience significantly.
Keep in mind that managing the Nutanix CVM effectively is crucial for cluster stability.
1. Changing CVM Hostname For DNS Record
To change / update the Nutanix CVM hostname need to follow following steps carefully.
Step 1: Check the Current CVM Hostname
Before making any changes, verify the existing CVM hostname using the following commands:
SSH “root” Login to AHV Host CLI Console and Run Following Command
virsh list –all
==> Command Output would be like:
AHV# NTNX-Node-serial-Number-CVM –running
Remember, the Nutanix CVM is vital for network operations within the cluster.
SSH “nutanix” Login to Target CVM CLI Console and Run Following Command
hostname
==> Command Output would be like:
CVM$ NTNX-Node-serial-Number-CVM
Step 2: Change the Nutanix CVM Hostname
Once you have identified the current CVM hostname, proceed with the following steps.
Step 3. SSH into the Target Nutanix CVM
Use the Nutanix default credentials to log in:
ssh nutanix@
Step 4. Execute the Hostname Change Command on target CVM
Run the following command to update the CVM hostname:
sudo /usr/local/nutanix/cluster/bin/change_cvm_hostname
Change Hostname script has been executed successfully.
Now press “Y” to Agree to reboot CVM to complete the CVM hostname changing procedure.
✅ Important: Your CVM hostname must follow a specific format to ensure cluster stability:
Mandatory Format: NTNX-Your_CVM_New_Name-CVM
Example: NTNX-AHVNode01-CVM
Note: The prefix “NTNX” and suffix “CVM” must remain unchanged—only the middle section is customizable.
Step 5: Register the New Hostname in DNS
After the CVM reboots, update its DNS records for both forward and reverse lookups.
- Forward Lookup (A Record): Maps the hostname to the CVM’s IP address.
- Reverse Lookup (PTR Record): Ensures proper resolution from IP to hostname.
After changing the Nutanix CVM hostname, ensure to verify the changes in the system.
Step 6 (Optional): Restart Gensis service
If New CVM hostname does not reflect then you can run following command to update
new Nutanix CVM hostname in clusters database just restart the Acropolis service:
genesis stop acropolis; cluster start
Ensure that the Nutanix CVM follows the mandatory naming conventions set by the organization.
Important Tips
For example, a valid Nutanix CVM name would be under the standard naming format.
- ✅ Always verify the existing CVM hostname before making changes.
- ✅ Follow the strict Nutanix naming format (NTNX-YourCustomName-CVM).
- ✅ Restart the CVM for hostname changes to apply properly.
- ✅ Update DNS records to ensure smooth network operations.
2. Change Nutanix CVM Display Name on PRISM
As of now you have changed the Nutanix CVM hostname and now need to reflect New CVM Hostname in Nutanix PRISM Console.
Now need to perform following steps to complete the CVM hostname procedure.
Step 1: Log into a Non-Target CVM
Since the CVM will restart after running the hostname change command,
log into a different CVM within the cluster to avoid session disconnect error.
Step 2: Execute the Display Name Change Command
Run the following command to update the CVM hostname in PRISM Console
change_cvm_display_name –cvm_ip=”IP Address of CVM that should be renamed” –cvm_name=
✅ Important: If you are using recent AOS version 6.8 or later along with compatible
AHV version 20230302.100173 (released on May 15, 2024), then need to run following
two commands to complete the procedure:
Reference Links for AOS & AHV Versions
To ensure compatibility, check the latest Nutanix AOS and AHV versions using the official Nutanix documentation:
Step 3: SSH into the AHV Host of the Target CVM
ssh root@
Step 4: Modify the Configuration File
Run the following command to update the CVM display name in cvm_config.json
:
jq ‘.name = “”‘ /etc/nutanix/config/cvm_config.json > /etc/nutanix/config/cvm_config.json.tmp
Step 5: Verify the Changes
Check if the new CVM name is correctly updated in the temporary config file:
cat /etc/nutanix/config/cvm_config.json.tmp
Step 6: Apply the New Configuration
Replace the original cvm_config.json
file with the updated version:
mv /etc/nutanix/config/cvm_config.json.tmp /etc/nutanix/config/cvm_config.json
After following above step to step instructions to change Nutanix CVM hostname and display name.
Your AHV cluster CVM’s names should be resolve by DNS server.
Final thought
Changing the Nutanix CVM hostname is a straightforward but essential process to ensure proper cluster configuration and DNS functionality.
By following the structured steps, Nutanix administrators can seamlessly rename their CVMs without any challenge.!
Thank you for being with HyperHCI.com! 🎉 We appreciate your time and effort in learning with us.
💬 Have thoughts or questions? Drop a comment below—we’d love to hear from you!
🔔 Want more updates? Subscribe to stay ahead with the latest tech insights.
Let’s keep the conversation going! 🚀
As a best practice, ensure that all Nutanix CVM names are adequately documented for future reference.
Successful management of Nutanix CVM ensures better overall performance of the cluster.
For any issues related to Nutanix CVM, always refer to the official documentation for guidance.
💬 Have any Nutanix CVM questions or thoughts? Drop a comment below—we’d love to hear from you!
Let’s discuss more about Nutanix CVM! 🚀
Related