Get XenServer VM name from within Windows VM

"c:\Program Files\Citrix\XenTools\xenstore_client.exe" read name

Works a treat.

This entry was posted in XenServer. Bookmark the permalink.

5 Responses to Get XenServer VM name from within Windows VM

  1. Tristan says:

    Hi,
    Is it possible to get another parameter (description,tags or folder) or a custom field ?
    Thanks for your answer
    Tristan

    • rcmtech says:

      There is some info here: http://wiki.xen.org/wiki/XenStore_Reference
      But I’m not getting much luck with a lot of it on XenServer 5.5 with a Windows Server 2003 VM.
      Some stuff that does work:
      xenstore_client /?
      which led to try using the dir command on the end, e.g.
      xenstore_client dir device
      then:
      xenstore_client dir device/vif
      then:
      xenstore_client dir device/vif/0
      which gave:
      backend
      backend-id
      state
      handle
      mac
      tx-ring-ref
      rx-ring-ref
      event-channel
      request-rx-copy
      feature-sg
      feature-rx-notify
      feature-no-csum-offload
      which ties up somewhat with the info in the wiki, though not completely. And nothing like what you’re after as far as I can see.

  2. Rachel Berry says:

    Hi Robin,

    Update: In XS6.1 we introduced an alternative to XenStore_Client.exe which going forward should be more robust and offers a far more flexible and richer interface via a standard Windows Management Instrumentation (WMI) interface. This offers the potential to develop feature rich scripts for tasks like VDI/XenDesktop deployment and includes the capacity to raise and watch events when values in xenstore change.

    Please do take a look: http://support.citrix.com/article/CTX136422

    Best wishes,
    Rachel

    (XenServer Partner Engineering)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s