VMware Cloud Community
kopper27
Hot Shot
Hot Shot
Jump to solution

Port Group - VLAN IDs Questions

hi guys

Can I change change the Port group of VM while running?

in case the VM was in Port Group named Testing - VLAN ID 100 and I need to change to Port Group Deployment VLAN ID 105 that means now my VM won't have access to traffic on vlan 100? that is automatically or I need to change IP or something?

and this comes from the FAQs

Q: Can a virtual machine be configured on multiple VLANs?

A: You can configure only one VLAN ID for each virtual network adapter on a virtual machine. However, since you can config-

ure up to four virtual adapters per virtual machine, you can set up a virtual machine spanning four different VLANs.

I think I am going to need to setup multiple VLANs for some VMs. what do they mean by "set up a virtual machine spanning four different VLANs"

thanks guys

Reply
0 Kudos
1 Solution

Accepted Solutions
naveenvm
Enthusiast
Enthusiast
Jump to solution

Yes u can definitely change the portgroup. But, be sure, your new vlan is configured properly so as to maintain the networking of the VM after the change.

Max. to max. 2-3 ping drops may occur depending upon your network utilization and ESX resource utlization for the change task.

Just go to edit settings -> virtual adaptor - > select new vlan -> OK

If you want your traffic to be shifted to another vlan dynamically, it needs to be done from the physical switch level. Think of the vswitch as a "dummy" layer 2 switch, it will follow the networking policies of the physical switch only, its rather a pass through only. Every thing depends upon the new port(nic) configured to take the new vlan properly or not.

NUTZ

VCP 3.5

(Preparing for VCP 4)

NUTZ VCP 3.5 (Preparing for VCP 4)

View solution in original post

Reply
0 Kudos
4 Replies
ctrople
Enthusiast
Enthusiast
Jump to solution

Yes, I believe you can change the port group used by the VM on the fly. Are your IPs statically or dynamically assigned? In theory if your VLANs are setup properly it should isolate the traffic, but I'd recommend doing a ping test between VMs on different VLANs.

My interpretation of that quote is that you can have a VM that uses 4 different VLANs if you configure the maximum of 4 virtual network adapters where each uses a separate port group/VLAN.

======================================

Chyna Trople, VCP

Monitor. Correlate. Act. | vWire.com

======================================

Chyna Trople, VCP Monitor. Correlate. Act. | vWire.com
naveenvm
Enthusiast
Enthusiast
Jump to solution

Yes u can definitely change the portgroup. But, be sure, your new vlan is configured properly so as to maintain the networking of the VM after the change.

Max. to max. 2-3 ping drops may occur depending upon your network utilization and ESX resource utlization for the change task.

Just go to edit settings -> virtual adaptor - > select new vlan -> OK

If you want your traffic to be shifted to another vlan dynamically, it needs to be done from the physical switch level. Think of the vswitch as a "dummy" layer 2 switch, it will follow the networking policies of the physical switch only, its rather a pass through only. Every thing depends upon the new port(nic) configured to take the new vlan properly or not.

NUTZ

VCP 3.5

(Preparing for VCP 4)

NUTZ VCP 3.5 (Preparing for VCP 4)
Reply
0 Kudos
kopper27
Hot Shot
Hot Shot
Jump to solution

everything was good

thanks guys

only one thing is pending basically I needed to move about 120 hosts to a new Port Group...so it would be nice to know how to script that or any way to do it faster instead of opening every VMs and editing the vNICto assign the new Port Group.

any one knows?

thanks

Reply
0 Kudos
Goll
Contributor
Contributor
Jump to solution

I know this is an old post, but in case anyone needs to know how to do it.

Say you have the list of VMs you wanna change thier port groups in a file called 'vms.txt'

cat vms.txt

centos55
reloadapp
freebsd6
debian6
win8

$vms = get-vm (cat .\vms.txt)

foreach ( $vm in $vms )

{

$vm | Get-NetworkAdapter | Set-NetworkAdapter -NetworkName production -Confirm:$false

}

Here we changed the port group to 'production'. I'm in no way a PowerCLI guru Smiley Happy

Reply
0 Kudos