Citrix XenServer: How to Access XenStore Information, from a Windows Guest VM, Using WMI Interface

An article by Rachel Berry from Citrix Blogs

A while ago I wrote a Knowledge Base article (CTX136426) documenting the Windows Management Instrumentation (WMI) available in XenServer to transfer data between the hypervisor and an operating system within a VM such as a XenDesktop or XenApp VD. I still frequently get enquiries on our SDK forum that are basically looking to see if such an interface exists so I’m republishing my article here in the hope that google finds it easier to index!

The WMI interface in XenServer uses the underlying Xen hypervisor XenStore datastore. It is of particular use to developers looking to build products for the XenServer platform such as anti-virus or backup products for XenDesktop or management/monitoring solutions. However it could also be exploited by an experienced System Administrator to develop their own scripts and tools. WMI offers a mechanism to access information about a Windows Virtual Machine from within the guest Virtual Machine (VM), such as the name of the VM or its IP address.

I had a lot of help from a very helpful XenServer developer (Ben Chalmers) in their Windows tools team to write this article, he even wrote several code examples below to get others started.

The information is fairly technical but we’ve had a lot of requests for more technical blogs recently, such as feedback from the UK User Group. We do try to listen and accommodate all tastes ;-)

 

The History of This Functionality

The XenStore_Client.exe is a small executable program that was (in previous versions of XenServer) distributed with the XenServer Tools and enabled users to access the value of parameters contained in XenStore. This program was removed from XenServer 6.1.0 as there was no knowledge of dependencies or other consumers. However, after the program was removed, Citrix noticed that there were users relying on this unsupported tool. XenStore_Client.exe was never officially supported or tested.

XenServer 6.1.0 introduced an alternative mechanism for extracting XenStore information by using Windows Management Instrumentation (WMI), which offers a far richer interface. This article provides information about using WMI for extracting XenStore information.

Developers wishing to use XenServer 6.2.0 and above and the Windows guest WMI interface as for communicating with XenStore and other hypervisor interfaces should read CTX136422 outlining its usage and providing code examples. The WMI interface can be used in XenServer 6.1.0 as an alternative to XenStore_Client.exe which was available in earlier versions of XenServer.

 

Summary

The XenStore_Client.exe is a small executable program that was (in previous versions of XenServer) distributed with the XenServer Tools and enabled users to access the value of parameters contained in XenStore. This program was removed from XenServer 6.1.0 as there was no knowledge of dependencies or other consumers. However, after the program was removed, Citrix noticed that there were users relying on this unsupported tool. XenStore_Client.exe was never officially supported or tested.

XenServer 6.1.0 introduces an alternative mechanism for extracting XenStore information by using Windows Management Instrumentation (WMI), which offers a far richer interface. This article provides information about using WMI for extracting XenStore information.

Background

This article is for (XenServer 6.1.0 and above) customers who use the Windows guest WMI interface as for communicating with XenStore and other hypervisor interfaces. The WMI interface can be used in XenServer 6.1.0 as an alternative to XenStore_Client.exe which was available in earlier versions of XenServer.

Read More

Be Sociable, Share!
 

Tags: , , , , , , , , , , ,

Comments

No comments so far.

  • Leave a Reply
     
    Your gravatar
    Your Name