Use cmdlet to live migrate VM changing the vNetwork.

Good morning.

I have to live migrate VMs from “Hyper-v on Server 2012” to “Hyper-v Server 2012 R2”.
Well, at the same time I have to migrate all the storage (Config, Snapshots, Pagingfiles and VHDs).
Up to here everything is ok. 
At the same time without loose the VMs connectivity I have to change the vNetwork because the vNetworks on the new Hosts are different.

I will use Move-VM powershell cmdlet, example:

Move-VM $VM remoteServer -VirtualMachinePath $Path1 -SnapshotFilePath $Path1 -SmartPagingFilePath $Path1 -IncludeStorage -VHDs @(@{"SourceFilePath" = $OldVHDPath1; "DestinationFilePath" = $NewVHDPath1}, @{"SourceFilePath" = $OldVHDPath2;
"DestinationFilePath" = $NewVHDPath2}) 

When I do it manually through the Hyper-v Console, it ask me to change it:

How can I change vSwitch at the same time that I Move the VM using a cmdlet without loosing connection?

Thanks in advance and have a nice week,
Angel Biurrun.

 

Read full post . . . .

Go Que Newsroom
Categories