With a Windows 7 guest comfortably installed on my Ubuntu host, I turn my attention to making it automatically boot and shutdown with the host. Traditionally, we would use a SysV-style init script that uses VBoxManage/VBoxHeadless to start the guest and VBoxManage to stop it. Upstart seems to be the way to go now, so let’s make a configuration file for that. And instead of powering off the guest every time (which should be done using ACPI events), it would be easier and faster to simply save the running state and restore it during the next boot.
Archive for August 2011
VirtualBox comes with a rather nice commandline interface, and here’s how you’d work it. The following commands have not changed much since VirtualBox 3.1, and they have just been tested on VirtualBox 4.1.
Before we start, here’re the guest specifications that we’re looking for…
- VM name mustard
- RAM 1 GiB
- SATA controller with 20 GiB disk at mustard.vdi
- IDE controller with CD/DVD at installer.iso
- Bridged networking using host adapter eth0
- OS Windows 7