AHV Host and Guest VMs Networking for Nutanix

AHV HOST AND GUEST VMS NETWORKING FOR NUTANIX

Description:

VMware ESXi, AHV, Citrix, Hyper-v networking documentations are available on portal.

How to configure open switch in AHV:

Open vSwitch Configuration

Nutanix AHV hosts Support Open vSwitch for HCI.

[root@ahvhost ~]#  ovs-vsctl show
2d822b99-3313-13127f-9f2121-4212b8db711
    Bridge "br0"
        Port "br0"
            Interface "br0"
                type: internal
        Port "vnet0"
            Interface "vnet0"
        Port "bond0"
            Interface "eth2"
            Interface "eth1"
            Interface "eth0"
    ovs_version: "1.10.0"


manage_ovs.

Steps to change the VLAN tag of VMs nic without deleting and recreating the VNIC

  1. Power off the Guest VM.
  2. Use acli command utility to modify VM nic configuration.
  3. Create a new network(acli or Prism) with different VLAN ID which you want to assign to the VM nic.
  4. Run following command on any of the CVM.
nutanix@cvm1$ acli vm.nic_update <vm_name> <nic mac address> network=<new network created in step 2>

Note: With AOS 5.10 VM network changing is hot add feature


How to add or remove the VLAN tag of CVM and AHV host in Nutanix

Recommended to Perform all AHV host and CVM network changes by connecting to the host using IPMI or BMC console.

Assign or change the VLAN on the AHV host with the following command:

[root@ahvhost ~]# ovs-vsctl set port br0 tag="vlan tag"

If you assign tag to bond please remove it with the below command.

[root@ahvhost ~]# ovs-vsctl remove port br0-up tag <vlan tag>

Enter the “ovs-vsctl show” command to see the changes. :

[root@ahvhost ~]# ovs-vsctl show
...
    Bridge "br0"
...
        Port "br0-up"
            Interface "eth2"
            Interface "eth3"
        Port "br0"
            tag: 90    <<<< Correct vlan tag location for AHV host
            Interface "br0"
                type: internal
 ...

To change the VLAN on the CVM just take the SSH of the CVM and enter below command.

nutanix@cvm1$ change_cvm_vlan <vlan tag>

Use the following command to set new vlan tag.

SSH from the host to the CVM (always SSH to the 192.168.5.254 address):
[root@ahvhost ~]# ssh nutanix@192.168.5.254
[root@ahvhost ~]# ovs-vsctl set port br0 tag=99


LACP Configuration on AHV

Follow KB article AHV | How to Enable, Disable, and Verify LACP

How to select active NIC in active/passive bond

AHV select Nic automatic in default configuration of AHV.ie. Active-backup

To find the active nic you can use below command.

[root@ahvhosthost ~]# ovs-appctl bond/show

Active interface will be marked as active slave.eth4 active in this example

[root@ahvhost ~]# ovs-appctl bond/show
---- br0-up ----
bond_mode: active-backup
...
slave eth3: enabled
        may_enable: true

slave eth4: enabled
        active slave
        may_enable: true

Make use right interface to change the active NIC run the command on AHV host.

[root@ahvhosts ~]# ovs-appctl bond/set-active-slave <bond name> <interface name>

Example:

[root@ahvhost ~]# ovs-appctl bond/set-active-slave br0-up eth3
done


How to Move 1G interfaces to a different bond than the 10G interfaces bond

Check in this post AHV | How to add or remove NICs from bridges of the workflow.


Bridges with single uplink

Check in this post how to create an AHV virtual switch (bridge) with single uplink. of the workflow.

Nutanix AHV Networking Video

Leave a Reply