VM NIC can works in two modes
- Access
- Trunk
Access nic are the default and NIC is associated with one VLAN. Whereas trunk can allow multiple VLAN on single NIC.
Note: Currently Trunk port can be added/ modifed from CLI only from the prism both access & trunk ports look same.
SSH on any of the CVM and run the below command.
nutanix@CVM~$ acli vm.nic_create <vm name> network=<network name> trunked_networks=<comma separated list of allowed VLAN IDs> vlan_mode=kTrunked
if VM name is DEMO & you want to allow VLAN 10,20,30,40 , we need to run below command.
nutanix@CVM~$ acli vm.nic_create DEMO network=network trunked_networks=10,20,30,40 vlan_mode=kTrunked
If incase if you want to convert Trunk NIC to Access NIC , then below is the command syntax.
acli vm.nic_update <vm name> <vm nic mac address> vlan_mode=kAccess update_vlan_trunk_info=true