Updated 2018-08-17: If you want to change virtual network for multiple VMs same time, check out Nutanix AHV – Change Virtual Network For Multiple VMs
This blog post will cover how to change virtual machine (VM) network adapter (NIC) to AHV network mapping. You got two options to do this:
- PRISM – You need to delete the existing NIC and add a new one. This can be done while VM is running but you’ll lose the MAC address of the existing NIC.
- ACLI – You can add and remove a NIC while the VM is running but if you want to just change the NIC mapping without having to delete the existing NIC which is possible via ACLI you need to shut down the VM first.
You can run the commands presented in this blog post on any Nutanix Controller Virtual Machine (CVM) in the Nutanix cluster which you access via CVM FQDN/IP address or via the Nutanix Cluster FQDN/IP address.
The UI based print screens are taken from PRISM which you access via the Nutanix Cluster IP FQDN (or the actual IP address) which is the recommended way or via a specific CVM FQDN/IP address.
My use case was to preserve the MAC address so I’ll show the acli way to change the VM NIC placement in the below steps:
- Shut down the VM and verify what NIC you want to move to a different network. In my case I only got one NIC
- Run the following command on any CVM to change the network placement and skip acli if you´re already in the acli shell which I’m since It provides you the excellent tab functionality.
- Verify the changes via:
- Use PRISM to start the VM or run the following command to start the VM
-
acli vm.on <VM-Name>
-
The environment used for this test was AOS 5.0.1 and AHV 20160925.30.
1 pings