Virtualization Technology News and Information
Article
RSS
Gathering virtual machine guest OS information in Microsoft Virtual Server

Ben Armstrong, the Virtual PC Guy, writes a simple script to display information about the guest OS of a running virtual machine.

Option Explicit

dim vs, vm

Set vs = CreateObject("VirtualServer.Application")

set vm = vs.FindVirtualMachine("a virtual machine")

'Display information about the GuestOS
wscript.echo "Guest OS Information:"
wscript.echo "====================="
wscript.echo "OSName                : " & vm.GuestOS.OSName
wscript.echo "AdditionsVersion      : " & vm.GuestOS.AdditionsVersion
wscript.echo "CanShutdown           : " & vm.GuestOS.CanShutdown 
wscript.echo "IsHeartbeating        : " & vm.GuestOS.IsHeartbeating
wscript.echo "HeartbeatPercentage   : " & vm.GuestOS.HeartbeatPercentage
wscript.echo "IsHostTimeSyncEnabled : " & vm.GuestOS.IsHostTimeSyncEnabled

Ben writes, "As you can see it displays the guest OS name (e.g. Windows XP), the version of Virtual Machine Additions that is installed, whether the guest operating system can be shut down remotely, if a heartbeat is being reported (and if so how many heartbeats have been received) and finally if host time synchronization is enabled.

All of this information can only be accessed if the virtual machine is currently running, and has Virtual Machine Additions installed.  If you try to run the script on a virtual machine that is not running, or does not have Virtual Machine Additions installed, you will receive an exception error."

Read the original or leave Ben a comment, here.

Published Friday, January 19, 2007 6:59 AM by David Marshall
Filed under:
Comments
There are no comments for this post.
To post a comment, you must be a registered user. Registration is free and easy! Sign up now!
Calendar
<January 2007>
SuMoTuWeThFrSa
31123456
78910111213
14151617181920
21222324252627
28293031123
45678910