Arnout's Eclectica

But I digress…

VMWare statement on “Industry Events” and “News and Awards”?

3 June 2008 15:03 — VMWare

I just received issue 49 of VMWare's corporate newsletter.

Since I don't let GMail automatically download images, this is what the message looked like initially:

blah blah

After downloading the images, it looks like this:

still blah blah :-)

Blah blah indeed.

Displaying VMWare Server status on the desktop

2 May 2006 21:55 — VMWare,Windows

In another post, I provided a VB script that outputs the status of the guests running on a VMWare Server. With a tiny modification that script can be used within Sysinternals' BGInfo, to display this information on the host's desktop:

Screenshot showing information about VMWare guests on the desktop

In order to do this, change the line "WScript.Echo s" to "Echo s". In BGInfo, create a VBScript Custom field, by clicking "Custom...", "New...", selecting "VB Script file" and entering a field name and the path to your script.

Using VmCOM to display the status of VMWare Server guests

29 April 2006 15:17 — VMWare,Windows

VmCOM is a COM-based API that allows you to control VMWare Server from your own software. As an example, the following script displays the status of each registered guest:

Option Explicit
Dim cp, server, vmCollection, vmName, vm, s

Const vmErr_VMBusy = &H80040215
Const vmExecutionState_On = 1
Const vmExecutionState_Off = 2
Const vmExecutionState_Suspended = 3
Const vmExecutionState_Stuck = 4

Set cp = CreateObject("VmCOM.VmConnectParams")
Set server = CreateObject("VmCOM.VmServerCtl")

server.Connect cp
Set vmCollection = server.RegisteredVmNames

For Each vmName in vmCollection
   Set vm = CreateObject("VmCOM.VmCtl")
   On error resume next
   vm.Connect cp, vmName
   If Err.Number = vmErr_VMBUSY Then
      s = Basename(vmName) & ":      BUSY"
   ElseIf Err.Number <> 0 Then
      s = Basename(vmName) & ":     ERROR"
   Else
      On Error Goto 0
      s = vm.Config("displayName") & ": " & State2Str(vm)
   End if
   WScript.Echo s
next


Function State2Str(ByVal vm)
  Select Case vm.ExecutionState
      Case vmExecutionState_On
         State2Str = "       ON"
      Case vmExecutionState_Off
         State2Str = "      OFF"
      Case vmExecutionState_Suspended
         State2Str = "SUSPENDED"
      Case vmExecutionState_Stuck
         State2Str = "    STUCK"
      Case else
         State2Str = "  UNKNOWN"
   End Select
End Function


Function Basename(ByVal path)
   Dim pos
   pos = InstrRev(path, "\")
   If pos > 0 Then
      Basename = Mid(path, pos + 1)
   Else
      Basename = path
   End If
End Function

Copyright © 2006-2009 Arnout Grootveld — Powered by WordPress — Hosted at pair Networks