Month: May 2008

Mapping a virtual network adapter to parent & child partitions under Hyper-V

As I had mentioned in one of of my previous posts, I have been doing some work on Hyper-V again. Over last week, I worked a bit on Virtual Switches and tried to find a WMI interface to map a virtual network adapter to parent partition or child partition. Msvm_SwitchPort gives a way to map Virtual Switches to Network adapters connected to each switch. It is surprising to find that MSFT while providing some very useful interfaces ignored the need for a straight interface to map these virtual adapters to virtual machines. However, there are other interfaces which can provide some information on what we need. These interfaces include, Msvm_ActiveConnection; Msvm_SwitchLanEndpoint; Msvm_VmLanEndpoint. Msvm_ActiveConnection provides information to map a virtual channel to a Virtual Machine. However, this is true only when all virtual machines are powered-on. Msvm_SwitchLanEndpoint maps parent partition virtual network adapters while Msvm_VmLanEndpoint maps child parition network adapters, again only when VMs are powered-on. One interesting side note is, the NIC GUID you would find in Msvm_VmLanEndpoint or Msvm_SwitchLanEndpoint is not the same as …