I'll take a stab at this so excuse me if I get it wrong. If you open the MOB for your vCenter (https://MyvCenter/mob) you can navigate to the port group this way:
Content | DVSManager | QueryDvsConfigTarget
From your vCenter GUI browser select a host connected to the dvSwitch and in the address bar you will see something like "host-12345". Note this.
From your vCenter GUI browser select the dvSwitch and in the address bar you will see something like "dvs-1234". Note this.
Go back to the MOB and:
- For "host" replace the MOID in the value column with the "host-12345" you retrieved above.
- For "dvs" replace the MOID in the value column with the "dvs-1234" you retrieved above.
Click "Invoke Method" and you will see all the port groups for this host on this switch. Click one and check the returned properties. It will be a link in the format "dvportgroup-##" which is the Key you see in PowerCLI. This is vSphere's internal reference to this port group. The ID property you see in PowerCLI to me is just a visual thing.
Original Message:
Sent: Aug 15, 2024 10:41 AM
From: Roger Haines
Subject: What is the difference between a vmware virtual distributed switch port group key and id
Restoring a VDS to a different vCenter as part of a DR process which at a high level is basically, replicate a datastore to our DR site and then scan the volume for .VMX files and register the VM to inventory on the DR vCenter. The problem is now that we're using VDS on the DR site, the VM Network setting for the Network adapter is empty. The reason, I believe is due to the VDS key and Port group IDs or key being missmatched. See below. My question is in the subject line. Notice the difference between the "key" and the "Id" below. Can someone help me understand the difference between these values and where they come from? I hope this makes sense. I'm tearing my hair out and don't have that much left! :)
VlanConfiguration : VLAN 222
Name : TEST-VDS-1
ExtensionData : VMware.Vim.DistributedVirtualPortgroup
Key : dvportgroup-6656888
Notes :
Datacenter : DR Recovery DC
PortBinding : Static
NumPorts : 8
VDSwitch : VDS-1
IsUplink : False
Id : DistributedVirtualPortgroup-dvportgroup-530750
Uid : /VIServer=domain\user@testvc.test.com:443/DistributedPortgroup=DistributedVirtualPortgroup-dvportgroup-530750/
VirtualSwitch : VDS-1
Kind Regards,
R