ArtinSoft's Blogs

Software Migration Experts
Welcome to ArtinSoft's Blogs Sign in | Join | Help
in Search

Jose Aguilar's Blog

All things migrations, software and technology

WMI and Virtual Server 2005

WMI (Windows Management Instrumentation) provides a mechanism to manage systems and applications in an enterprise environment. WMI is actually Microsoft’s implementation of Web Based Enterprise Management (WBEM), a unified mechanism used for managing networks.

With the release of Virtual Server 2005, Microsoft included new classes in WMI in order to manage and monitor VS2005 installations. These classes are represented through a namespace, in this case //root/vm/virtualserver. So, if you are new to WMI and Virtual Server, what can you do with this information?
Let’s start off by introducing you to two tools that can get you started.

The first one is WMI Explorer, a free tool from KS-Soft, that can show you the available classes and methods in a WMI namespace. When you first start up the application, you’ll see a class explorer that shows you all the classes available in the default namespace, root\cimv2 (CIM stands for Common Information Model, the data model of the WBEM standard). To connect to a different namespace, you need to select Action->Connect to Remote Host… , and then enter Virtual Server’s namespace:

wmi1

You can also enter the address of a remote host to connect to a remote instace of Virtual Server. Keep in mind that you need to enter a user with enough privileges.
Once you press enter, you’ll be presented with Virtual Server’s classes. Of particular interest are the last four: VirtualMachine, VirtualNetwork, VirtualServerProvider and VmWmiObject:

wmi2

With these four classes you can access virtually all information about a Virtual Server installation. Double clicking on them in WMI Explorer will show you all of its properties and the current state.
With this information, what things can you do? Well, that’s where the second tool comes into play. It is called Scriptomatic 2.0,  a WMI utility you can download from Microsoft’s website that helps you write WMI scripts. When you open this tool, you first need to select the correct WMI namespace:

wmi3

And after that, you can select any of the WMI classes declared within that namespace, and that will write a basic script for you that queries the class:

wmi4

Based on it, you can start querying the VMs, the Virtual Networks, the status of the server, etc… and you can even run the scripts from within Scriptomatic. From this point on, you can start exploring the information you can query, and write your own WMI scripts!

Published Jul 28 2006, 10:50 PM by Jaguilar
Filed under:

Comments

 

Dugie's Pensieve said:

WMI and Virtual Server 2005
I was helping a friend earlier today with some "VM Stuff" and querying Virtual...
September 13, 2006 3:01 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit

About Jaguilar

Jose A. Aguilar has been working at ArtinSoft for more than 6 years, starting out with Informix to Java migrations and moving on to VB6 to .NET conversions using the Visual Basic Upgrade Companion. He currently works as both Senior Software Migration Consultant and Program Manager for the Visual Basic Upgrade Companion, helping clients to leverage their existing investments in VB6 by moving them to .NET Framework.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems