As per client requirement sometime need to change / modify the Nutanix CVM ( Controller VM ) hostname and/or Nutanix CVM ( Nutanix Controller VM ) name that shows as VM name in Nutanix Prism as well and with new Nutanix CVM hostname that needs to create DNS entry in local name server.
To change Nutanix CVM’s ( Controller VM ) hostname and/or ( Nutanix Controller VM ) name is possible through command line only.
Note: When you change Nutanix CVM hostname, will not reflect in prism. You need to run ‘hostname’ command on each Nutanix CVM.
Read also: Enable Nutanix CVM, AHV Maintenance mode
Change Nutanix CVM Hostname
To change the Nutanix CVM hostname need to follow following steps carefully and need to restart the acropolis service to take effects.
Follow the steps to change Nutanix CVM hostname
If you are using AOS 5.10.x or later then you can follow below steps
Step 1: SSH in to target Nutanix CVM ( Nutanix Controller VM ) need to change hostname.
Note: Nutanix CVM, AHV, IPMI, Default Credentials
Step 2: After logged in to the Nutanix CVM run the following command to change Nutanix CVM hostname.
CVM$ sudo /usr/local/nutanix/cluster/bin/change_cvm_hostname <NTNX-Enter_new_cvm_host_name-CVM>
Note : Nutanix CVM hostname Prefix as ‘NTNX’ and suffix ‘CVM’ word is mandatory to use, you can change the middle character as your choice.
Nutanix CVM will take restart to during the changing the hostname.
Repeat this command for each Nutanix CVM one by one once recently rebooted Nutanix CVM comes up and take back the ownership of all services then you can proceed to change other Nutanix CVMs hostname.
Step 3 ( Optional ): If new Nutanix CVM hostname does not show off then you can run following command to update new Nutanix CVM hostname in clusters database just restart the Acropolis service:
CVM$ genessis stop acropolis; cluster start
Note: No impact on running production VMs, will get some alerts in Nutanix Prism just resolve them.
Step 4: close the Nutanix CVM’s console ssh / putty session in which you have logged in and re-open to see the changes.
Optional: If Step 3 does not work, just restart each CVM in 10-15 minutes interval.
Read also: How To Reset / Change Nutanix IPMI Password
Change Nutanix CVM Name in Prism
Nutanix administrator can change the Nutanxi CVM ( Controller VM ) name only in Prism from Nutanix native AHV Hypervisor to run following commands
Step 1 : SSH to Nutanix AHV host to determine the Nutanix CVM name
Note: Nutanix CVM, AHV, IPMI, Default Credentials
AHV# virsh list --all
Output will look like this
NTNX-Node-1-CVM shut off
Step 2 : Shutdown Nutanix CVM to change CVM hostname
If Nutanix Acropolis cluster is running then run following command only
cvm$ cvm_shutdown -h now
If Nutanix CVM is running standalone ( Not a part of Nutanix running cluster ) then run Following command from Nutanix AHV.
ahv@root# virsh shutdown <Nutanix-CVM_Name>
Step 3 : Change Nutanix CVM name
AHV# virsh domrename NTNX-Node-1-CVM NTNX-<New_name>-CVM
Note : Nutanix CVM name Prefix as ‘NTNX’ and suffix ‘CVM’ word is mandatory to use, you can change the middle character as your choice.
Step 4 : Power-on / start the Nutanix CVM using New CVM Name
AHV# virsh start NTNX-<New_name>-CVM
Step 5 : Enable ‘Autostart’ flag on Nutanix CVM to start / shutdown with host
ahv@root# virsh autostart NTNX-<New_name>-CVM
Step 6 : Cross check new CVM name through following command
AHV# virsh list --all
OR
ahv@roo# vi NTNX-NEWNAME-A-CVM.xml
Read also: Reset Nutanix Prism Web Console Password
Nutanix CVM hostname vs CVM Name
Do you know what is the key difference between Nutanix CVM hostname and Nutanix CVM name. If your answer is NO ( As expected ).
Not to worry, i have written the answer for you, right here..
Nutanix CVM hostname is net-bios name that can be resolved against Nutanix CVM IP address. In other word – Nutanix CVM hostname is real name, that’s need to make DNS entry against Nutanix CVM IP address.
Nutanix CVM Name is the simple naming convention that is visible in Prism only and useful to identify the VM only. Nutanix CVM name can not be resolved again Nutanix CVM IP address.
Read also: How To Change Nutanix CVM, AHV and IPMI Passwords
Conclusion
I hope, now you have more clarity on to change the Nutanix CVM hostname and Nutanix CVM name. And you better understanding about Nutanix CVM hostname vs CVM name only.
Thanks to being HyperHCI Tech Blog to stay tuned with latest and trending technology updates. Follow Us Now .