VMware Cloud Community
KGadowski
Enthusiast
Enthusiast

Two NetworkNames in VSphere client Summary view after using



Hi,


I have a strange problem when I try to swap VLANs on a Virtual Machine using PowerCLI. I use the below code for that:


Set-NetworkAdapter -NetworkAdapter $nic -NetworkName $VLANID -Connected:$false -Confirm:$false| Set-NetworkAdapter -Connected:$True -Confirm:$false


After applying it, the VLAN changes to the value of VLANID, however in the Summary tab of my VM I can see both: old and new vlans connected. When I access settings of that VM, I can see only one NIC connected* only to the new VLAN*.


What is the best way to do this?


Thanks!

Reply
0 Kudos
4 Replies
EKardinal
Enthusiast
Enthusiast

Hi,

Are there any Snapshots on the VM?

A Snapshot also keeps the old network informations and you'll see both networks in the summary view.

Regards

Reply
0 Kudos
KGadowski
Enthusiast
Enthusiast



Thanks a lot EKardinal!


That was it. It didn't think it could be so simple.


Regards,


Kamil

Reply
0 Kudos
LucD
Leadership
Leadership

I suspect this is a timing and refresh issue in the client.

To make absolutely sure you could try a unregister/register of the VM.

That way you should see the latest info in the client


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
KGadowski
Enthusiast
Enthusiast



No, it was caused by the snapshot created before modification (As suggested by EKardinal). Removing the snapshot solved this issue. Thanks for help guys! You made my day.

Reply
0 Kudos