Hello,
I have a task to move VM's that have more than 1 vNIC connected to a dvSwitch to a vSwitch without any downtime. If the VM has only one vNIC I can do the migration option from the dvSwitch. Works like a champ. My problem is most of my VM's have 2 or 3 vNIC's attached. I've looked for a script that will help me select a VM and migrate it's vNIC's but came up short. PLEASE HELP as I am new to scripting and go easy on me!
Example:
dvSwitch-Test
testVM
vmnic0
vmnic1
Migrate to:
vSwitch0
testVM
vmnic0
vmnic1
Are these NICs teamed inside the guest OS ?
Or are these 2 separate LAN connections ?
Can the VM run temporarily on 1 NIC ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
They are not team within the OS but they are on different vLAN's. They can if the vLAN's are available to the single NIC.
Thank you for replaying.
Did you already try with the Set-NetworkAdapter cmdlet.
You should be able to:
And then repeat this for NIC1.
You can/should check connectivity after important changes (i.e. VLAN remaping, portgroup change...).
I would use the Get-VMGuestNetworkInterface for this.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I've been trying to complete this with the script from Gabes web site. I'm guessing you are the same LucD in his scripts? I'm stuck on the second part "Move-VM-to-vSwitch".
I'm very new to scripting so I will give the Set-NetworkAdapter a try. I have a few 100 VM's that I need to move from one vCenter to another.
Again thank you for the help.
Let me know how far you get with Gabe's script.
If you're stuck don't hesitate to ask here.
Yes, I'm the same LucD :smileygrin:
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference