VMware Cloud Community
HMAAdmin
Contributor
Contributor
Jump to solution

Make one VM use one NIC while all other VMs use another?

Hello, I'm trying to figure out how to make one VM use one NIC, while all my other guest VMs share another. Having a hard time working out how to set this up. Anyone know how to accomplish this?

I've attached a screenshot of how my networking is currently configured, if that helps.

Thanks,

C

0 Kudos
1 Solution

Accepted Solutions
wwan
Enthusiast
Enthusiast
Jump to solution

You can create another port group say "VM network 2" and set the NIC teaming to vmnic1 active and vmnic0 standby (opposite to your current setting). Then add this particular VM to VM network 2. This allows failover between the two NICs. If you want to have them using one NIC all the time, just set one active and other "unused" in one port group and opposite in other group or at switch level. Note port group policy can override switch level policy.

View solution in original post

0 Kudos
17 Replies
wwan
Enthusiast
Enthusiast
Jump to solution

You can create another port group say "VM network 2" and set the NIC teaming to vmnic1 active and vmnic0 standby (opposite to your current setting). Then add this particular VM to VM network 2. This allows failover between the two NICs. If you want to have them using one NIC all the time, just set one active and other "unused" in one port group and opposite in other group or at switch level. Note port group policy can override switch level policy.

0 Kudos
HMAAdmin
Contributor
Contributor
Jump to solution

Thanks! Can this be done during production hours, or will this temporarily disconnect the VM from the network during the switchover?

0 Kudos
wwan
Enthusiast
Enthusiast
Jump to solution

I would expect a few packets dropped while you move the VM, depends on the services that are running. I would still do it at a quiet period. all other VMs shouldnt be affected.

0 Kudos
HMAAdmin
Contributor
Contributor
Jump to solution

Sorry, another quick question. Do I need to assign an IP address to this NIC at the host level? The other NIC already has an IP assigned to it, but that looks like it's for the "Management Network". I can't find anywhere in the interface to assign an IP to the second NIC. . .

0 Kudos
wwan
Enthusiast
Enthusiast
Jump to solution

No you dont need to. Management IP is assigned to vmk not the physical NICs. No IP is required for port groups used for VM. Only when you are using vmk such as for management, vmotion or storage, you will need to assign IP but again to vmk not physical NICs.

0 Kudos
HMAAdmin
Contributor
Contributor
Jump to solution

Great, thanks for the info. Will try switching over the VM to the new network tonight.

0 Kudos
HMAAdmin
Contributor
Contributor
Jump to solution

Decided to wait until we had a day where the production machine was down to make the switch. Made your suggested changes and all seems well! Does this all look alright to you?Capture.PNG

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Just a quick question? Do all the VMs run on the same subnet? In this case I would rather use a single vSwitch and configure the uplinks in the port groups as active/standby. This way you would still have connectivity to all VMs as well as the Management Network if one of the uplinks fails.

André

0 Kudos
HMAAdmin
Contributor
Contributor
Jump to solution

Yep, they all run on the same subnet. That actually sounds like a pretty good idea. Are there any potential downsides I'm not thinking of?

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

I don't think there are any downsides, except you consider it a downside that all VMs will run on the same NIC in case of a failure. You actually add redundancy to the whole system by using a single vSwitch.

André

0 Kudos
HMAAdmin
Contributor
Contributor
Jump to solution

Hmm, tried setting it up as described, but my other NIC is no longer available after deleting the other vSwitch. How can I re-add it?

Capture.PNG

Capture2.PNG

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

First you have to add the second NIC in the vSwitch's properties. Then modify each of the port groups' failover order in the NIC teaming tab.

André

0 Kudos
SCMHenry
Enthusiast
Enthusiast
Jump to solution

You can edit the properties of your vSwitch to add the second physical NIC, and configure as desired.

0 Kudos
HMAAdmin
Contributor
Contributor
Jump to solution

Ah, right, I missed that tab when I looked in there initially.

So, I set things up the way you suggested (I believe), I made NIC 1 active for the new port group and put NIC 0 as standby for the new port group, and did the opposite for the old port group:

Capture.PNG

However, my graph of the network connections still looks the same. Should it look a bit different?

Capture2.PNG

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Unfortunately, the configuration won't show up in the graphic, however it'll work. You can verify this using esxtop on the host's command line to see which vmnic is used by each of the VMs. Alternatively, you can check the MAC addresses on the physical switch ports.

André

wwan
Enthusiast
Enthusiast
Jump to solution

Apology for my original post not being clear. I meant adding "VM network 2" to the SAME vswitch not creating another vswitch. Then have opposite nic teaming settings for "VM network" and "VM network 2" to achieve one VM using one nic and rest using the other nic as well as having redundancy as André mentioned. The nic teaming can force different portgroup to use different nic. So your config seems alright. Just be sure the VM network is having opposite nic teaming to POS VM Network

HMAAdmin
Contributor
Contributor
Jump to solution

Sweet, looks like it's all working well so far. Thanks for all the insight fellows!

0 Kudos