VMware Cloud Community
zare_N0222
Enthusiast
Enthusiast

Migrate vDS from 6.0 to 6.6

Hello , 

In my environment, I have an old version of the distributed switch and I want to upgrade it to version 6.6 . there ares several host that use that vDS and more than 100 VMs. I want to create a new distributed switch and migrate uplink, vmkernel and VMs.

My problem is that there is too many port groups and want somehow to use powercli export port group from old vDS and create them on new vDS. 

Get-VDSwitch -name dvsOLD | Get-VirtualPortGroup | Out-File -FilePath D:\_scripts\VBs\port1.txt

I stack with import of port group on new vDS. 

Does someone know how to import port group ?

 

Reply
0 Kudos
1 Reply
zare_N0222
Enthusiast
Enthusiast

I managed to import , I google it for a bit.  basically, file has three columns , first Name, second VLAN id , and 3rd number of ports.

$file = Import-Csv d:\_scripts\VBs\port.csv -Header @("Name","vlan", "NumPorts")
foreach ($vlan in $file)
{

Get-VDSwitch -Name "DSwitch" | New-VDPortgroup -Name $vlan.Name -VLanId $vlan.vlan -NumPorts $vlan.NumPorts
}

Reply
0 Kudos