Setting The BIOS Boot Order Programmatically Under Virtual Server
Saturday, 22 April 2006 by Michel Roth
Another great tip from the Virtual PC Guy: setting the BIOS boot order programmatically under Virtual Server:

"I while ago I talked about how to change the boot order in the BIOS by editing the VMC file - and just recently my co-worker, John Howard, pointed out that this could be done programmatically using GetConfigurationValue. GetConfigurationValue and SetConfigurationValue are two interesting (and really quite powerfull) APIs - and I will probably post about this more in the future. In the mean time I thought it would be a good idea to provide a sample script:

Set vs = CreateObject("VirtualServer.Application")
set vm1 = vs.FindVirtualMachine(WScript.Arguments(0))
set vm2 = vs.FindVirtualMachine(WScript.Arguments(1))

key = "hardware/bios/cmos"

result = vm2.SetConfigurationValue(key, vm1.GetConfigurationValue(key))


This script takes two virtual machines as command line parameters and copies the BIOS configuration from one to the other. Note - the reason why I am copying this between virtual machines (rather than loading a preconfigured value) is that the CMOS key is actually a byte value - which is really quite hard to manage under VBScript.

Read it all here.

Related Items:

Looking at the VM Heartbeat with WMI (13 October 2006)
Scripting Automatic Startup For Virtual Machines Under Virtual Server (17 March 2006)
Default virtual machine NumLock state (28 March 2006)
MFCOM Script To List Applications Only In Specified Folders (29 August 2006)
Remotely Control VMware Server Machines (14 June 2006)
Converting Virtual Hard Disks programmatically (31 March 2006)
Creating A Internet Explorer Safe Browsing Appliance (14 February 2006)
Rootkits Operating From BIOS (27 January 2006)
Comments (0)add feed
password
 

busy