VMware Cloud Community
Osaidaz
Enthusiast
Enthusiast

Putting VM in different vlan

Hi

I have a single hot that is running 4 VM, I want to separate them by putting them in different vlan, I have 2 cables that coming out of my server

how can i do that?

should i just add them in different port group?

thanks

Tags (1)
4 Replies
daphnissov
Immortal
Immortal

Create a new port group and apply whatever VLAN ID you see fit. Keep in mind the upstream physical switch into which that vmnic is cabled must allow this VLAN as well.

YahyaZahedi
Enthusiast
Enthusiast

Hi

It depends on you and your environment, but you have multiple choices. You can tag VLAN id inside your virtual machine, in the switch or on the physical switch. You have 4 VMs and 2 uplinks, so you can put uplink in trunk mode and create a port group of each virtual machine and set specific VLAN for it, Or you can create a port group and set VLAN id 4095 (trunk mode )then add 4 VMs to this port group and set VLAN id inside of each virtual machine.

For more information about the type of VLAN tagging refer to the following link.

VMware Knowledge Base

0 Kudos
HassanAlKak88
Expert
Expert

Hello,

Noting that the recommended way to do that (like production environment) is as following:

  • Create a virtual switch on your host with two uplinks
  • Aggregate and configure this two uplinks as trunk in your physical switch
  • Create different port group each one for separated VM, and from port group settings you can specify the tagging ID
  • Assign each port group to the specific VM

Please consider marking this answer "correct" or "helpful" if you think your question have been answered correctly.

Cheers,

VCIX6-NV|VCP-NV|VCP-DC|

@KakHassan

linkedin.com/in/hassanalkak


If my reply was helpful, I kindly ask you to like it and mark it as a solution

Regards,
Hassan Alkak
0 Kudos
TwinTurboRob
Enthusiast
Enthusiast

Is the physical switch capable of vlan operation?

Rob

0 Kudos