PXE boot in Virtual Server 2005 R2 after an OS is installed in a VM
I had an email from Kari this afternoon asking what key should be used to trigger PXE-booting of a VM under Virtual Server 2005 R2 after an OS is already present on the hard disk. Kari pointed out it worked if there was no OS previously installed (as there's no boot device on a floppy, CD/DVD or hard disk, so it tries the network).
The answer to the question is to have nimble fingers. You need to change the BIOS boot order in the VM to ensure that the network device is higher in precedence that the boot hard disk with the operating system installed. Why be quick - depending on how fast your host machine is, you need to press DEL during the boot. Simply update the boot order to look something like below.
To be quick enough, on the host I was testing this on, it meant needing to have the VMRC window pointed at the VM and hit reset in the Virtual Server admin interface to start the machine (re-) booting. That gives you enough time to see the BIOS and hit DEL.
There's no scriptable way I know of to do this (ie through the Virtual Server COM API), however you can, and I stress is absolutely and totally unsupported, script a change to the VMC file to update the BIOS string under Preferences/hardware/bios/cmos. A windiff of a before and after will tell you what bytes to changes, but don't rely on this working in the future.
Cheers
John.
Comments
- Anonymous
January 01, 2003
....so I have to thank my bosses boss for pointing this one out (and I guess this means I've also... - Anonymous
April 12, 2006
Why not do it the easy way -- reconfigure the VM to NOT have any VHD, reset/reboot and now you have time to reconfigure the bios as there is no hd/OS to boot, then shutdown and reconfigure again to point to your VHD. - Anonymous
April 12, 2006
Robert - agree, in most situations that would be the easiest and most straightforward thing to do (especially if you're using a dynamic disk - it would just keep growing even if you reformat it during the re-installation). However, I was just answering the question as asked.... :)
Cheers,
John. - Anonymous
June 11, 2008
I have found the only way around a CD drive not being recognised is to use the VMRC Plus application available from MS to run VS 2005. The web management just would not work after the first install. VMRC Plus is a pretty handy tool anyway.