I received a question about the Primary NIC option in a VMware vCloud Director. The question is: What’s the function of this Primary NIC?
A Primary NIC is a vCloud Director option that doesn’t exist in VMware vSphere. The Primary NIC has to do with the network configuration of a vApp. A vApp is the container for your virtual machines; each virtual machine in vCloud Director is contained in a vApp.
The following vApp contains a Microsoft Domain Controller and an Exchange DAG cluster:
The network configuration for this vApp has three segments:
- One local vApp network called MKV Network;
- Another local vApp network called MKV-DAG-Network, this network is for the heartbeat within the Exchange Database Availability Group;
- An external network to connect to the vApp from the outside world (outside of the cloud).
Note: This vApp was created for demo purposes. In a normal situation you would link the Exchange cluster to the ouside world as well.
Let’s now take a closer look at the DC-1 network configuration, which shows the Primary NIC option. This particular virtual machine has two nics:
Nic 1 is selected as the Primary NIC. You should configure the NIC that is linked to network hosting the default gateway as the primary NIC, in this case the “External Network” segment.
By selecting NIC 1 as the Primary NIC, vCloud Director will push the gateway and DNS settings to the network adapter of the Guest OS running in this virtual machine. No DNS and gateway setting will be pushed to NIC 0, because this is not the primary NIC. vCD will only push the ip address and subnet to this NIC.
vCD use the DNS and Gateway settings that are configured in the network specification of the connected network. In this example the network specification for the “External Network” will be pushed. Depending on the type of network (external, external routed, organization or vApp network) you can set the network specification within the general vCloud configuration, the administration interface of the organization or within the vApp.
Note: The IP settings in vCloud Director will only be pushed to the virtual machine(s) if the VMware Tools are installed, which of course is recommended.
The use of a primary NIC will result in a correct and working network config for the virtual machines in your vApp. It’s important that you select the correct NIC as the Primary NIC, otherwise you could face connection issues.