WMI and Virtual PC

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Jack Peacock (peacock_at_simconv.com)
Date: 03/04/04


Date: Wed, 3 Mar 2004 18:34:54 -0800

I tried some WMI queries on a virtual XP machine running the latest version
of MS Virtual PC. It works, but gives some surprising results. The
motherboard shows it is a MS Virtual Machine, so it's easy to find out if
the target is a VM (virtual machine). FYI for anyone who might want to
account for a VM: Disk and CD show as virtual devices, the display shows the
actual hardware but the virtual resolution (as expected). Memory slots show
as four banks, DIMM0 and three DIMM1, each 16MB in size, even though the VM
is allocated 192MB of RAM. The total memory shows correctly, but there is
no information on cache size. Network hardware queries show actual hardware
and real gateway, IP address, etc., even routing tables (the VM is running
XP SP1).

I'm not sure how one could determine the host machine from a WMI query, what
class to use. Does anyone know if MS has added some WMI support to Virtual
PC itself as yet? If not it would be nice if there was a class on the host
to show VMs, and maybe something on the VM to link back to the host, either
a name or IP address.

I haven't tried network sharing on the VM yet so not sure how it will affect
Network WMI classes.
   Jack Pea***


Quantcast