VMware Cloud Community
justme00
Enthusiast
Enthusiast

Migrate a VM that is connected to a distributed switch portgroup

Hi,

  I would like to migrate OFFILINE  a VM that has a NIC connected to a dVS portgroup to another host that is part of another distributed switch ( with different portgroups ) .

  I try to do the migration , I get a warning that the vm uses the network distributed virtual switch bla bla bla which is not accessible ( which is normal )  , and when it tries to move it I I get the error :

Cannot create Distributed Port Group dvportgroup-184 of VDS bla on the host xxx1

vDS operation failed on host xxx1 , Received SOAP response fault from [<cs p:000000000d3a72b0, TCP:xxx1:443>]: applyDVPortgroup Received SOAP response fault from [<cs p:1f331598, TCP:localhost:8307>]: applyDVPortgroup

fault.DvsApplyOperationFault.summary got (vim.fault.DvsApplyOperationFault) exception

If I try to move the VM to another datacenter/ another host that has no distributed switch , the migration is successful ( and I can then go and at the vmnic and choose another network instead of Invalid backing.

How can I perform this migration ? I do not want to remove the nic , do the migration then add the nic again ( and set the mac address to manual with the old mac , to preserve the settings)

Forgot to mention - vCenter 5.5 , ESXi 5.5 latest builds.

Thank you very much in advance ! Smiley Happy

7 Replies
a_p_
Leadership
Leadership

I'm not sure whether this will work, but it might be worth a try. Create a Standard vSwitch with a VM port group and reconfigure the VM prior to migrating it to the other host.

André

justme00
Enthusiast
Enthusiast

Hi,

  Thank you . It works and I have to say it crossed my mind , BUT we do not have a standard switch . I would have to create one , which would be kind of "weird" and how should I explain to the customer that it does not work otherwise Smiley Happy.

Currently I have experienced this in my home lab , while preparing a documentation with steps that will take place for a migration; so I can't open a SR for this...

Wanted to see if there is a reason for this issue and maybe a fix...

Reply
0 Kudos
bayupw
Leadership
Leadership

Hi

You might want to highlight the vSphere Documentation on vSphere vMotion Requirements here: vSphere 5.5 Documentation Center - vSphere vMotion Networking Requirements

There is a requirement for VDS:

"If you are using vSphere Distributed Switches for networking, ensure that source and destination hosts are members of all vSphere Distributed Switches that virtual machines use for networking."

With this, you can explain that the requirements is to have source and destination hosts to be a member of same VDS.

For VSS requirement:

"If you are using standard switches for networking, ensure that the network labels used for virtual machine port groups are consistent across hosts. During a migration with vMotion, vCenter Server assigns virtual machines to port groups based on matching network labels."

Since the requirement for VDS is not met, you can have a justification to create a standard switch since you can easily meet the requirement by creating a standard switch with same network label.

If you do not have any spare vmnic, you can create a standard switch without any uplinks with some tuning on the advanced settings as per document:

"By default, you cannot use vMotion to migrate a virtual machine that is attached to a standard switch with no physical uplinks configured, even if the destination host also has a no-uplink standard switch with the same label.

To override the default behavior, set the config.migrate.test.CompatibleNetworks.VMOnVirtualIntranet advanced setting of vCenter Server to false. The change takes effect immediately.

For details about the setting, see VMware knowledge base article at VMware KB: Troubleshooting migration compatibility error: Currently connected network interface uses....

For information about configuring advanced settings of vCenter Server, see Configure Advanced Settings in the vSphere Web Client."

Bayu Wibowo | VCIX6-DCV/NV
Author of VMware NSX Cookbook http://bit.ly/NSXCookbook
https://github.com/bayupw/PowerNSX-Scripts
https://nz.linkedin.com/in/bayupw | twitter @bayupw
Reply
0 Kudos
justme00
Enthusiast
Enthusiast

Hi,

  Thank you for the feedback. However : I am not trying to do a vMotion . I am trying to do a Cold migration - The VM is powered off. I tried also " Change Both Host and Datastore " , and I get the same result .

As described here : vSphere 5.5 Documentation Center "You can also use cold migration to move virtual machines from one datacenter to another."  Also on vSphere 5.5 Documentation Center there is no specific network requirement ...


Even the fact that I am allowed to continue with the Migration ( as mentioned in my post , I get a WARNING that the destination does not have the distributed port group, and I am allowed to continue) makes me thing that this is some kind of bug... Because if there would be anything that would prevent me from doing the migration , I would get an error at validation ...


Kind of weird this situation ... maybe at some point I will find the cause. Any other feedback is greatly appreciated.

Reply
0 Kudos
JPM300
Commander
Commander

One limitatino of VDS is you can't live migrate VM's from one to another.  However vSS it doesn't care as its always jumping vSwitches so all that has to match up is the port group name.  We have had to setup VSS before when migrating datacenters from an old Vmware infrasturcutre to a new.

However the last VMworld showed some demo stuff that would allow for you to migrate between VDS in the future as it would allow you to select the new VDS, portgroup ect during the migration, however this was all test/demo stuff that will probably make its way into future revisions.

Hiney
Enthusiast
Enthusiast

Moving to a dummy standard vswitch before moving is definately the way to go. Got esxi 5.5u2

still get the verification that "VM network doesn't exist" on the target, but clearly the code for migration has the correct error checking to ignore that, whereas the code for disrtibuted switches hasn't.

apparently someone in vmware forgot that if (like us) you go totally distributed vswitch, normal things like moving VMs around still happen.

P

"I have an inferiority complex, it's just not a very good one."
seabrink
Contributor
Contributor

After getting the same error as the OP I created a standard switch on the source host. I did not add any Uplinks. In fact, I named the vSS ForColdMigrationOnly. I changed the Network adapter in Edit Settings to the vSS. The cold migration (moving both the host and storage with the VM powered off) worked just fine. Going into Edit Settings after the migration completes I see that the Network adapter is still set to ForColdMigrationOnly. I modify it for the correct Distributed Portgroup and BAM! Same server, new datacenter.

Reply
0 Kudos