I was trying to setup VirtualBox on my Athlon 2600+ server under my desk to run Windows XP. The following are the steps which I used to install and use Virtual Box:
Install VirtualBox on CentOS 5
wget http://download.virtualbox.org/virtualbox/4.0.8/VirtualBox-4.0-4.0.8_71778_rhel5-1.i386.rpm yum -y install libGLU SDL rpm -ivh VirtualBox-4.0-4.0.8_71778_rhel5-1.i386.rpm
Setting up a VM
As per the documentation at: http://www.virtualbox.org/manual/ch07.html#idp11472496
VBoxManage createvm --name "WindowsXP" --ostype WindowsXP --register VBoxManage modifyvm "WindowsXP" --memory 256 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0 VBoxManage createhd --filename "WindowsXP.vdi" --size 10000 VBoxManage storagectl "WindowsXP" --name "IDE Controller" --add ide --controller PIIX4 VBoxManage storageattach "WindowsXP" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium "WindowsXP.vdi" VBoxManage storageattach "WindowsXP" --storagectl "IDE Controller" --port 0 --device 1 --type dvddrive --medium /mnt/box/downloads/OS/windows_xp-sp3.iso VBoxManage modifyvm "WindowsXP" --vrde on
To start the newly created virtual machine, run:
VBoxHeadless --startvm "WindowsXP"
Making Remote Desktop Work
By default, the Virtual Box install does not come with the extension pack which enables VRDE. If you attempt to start the VM with VRDE enabled:
VBoxHeadless --startvm "WindowsXP" --vrde on
You will see this error in your log file:
VRDE: VirtualBox Remote Desktop Extension is not available.
To install the extension pack, download the latest extension pack at: http://download.virtualbox.org/virtualbox/
For example:
wget http://download.virtualbox.org/virtualbox/4.0.8/Oracle_VM_VirtualBox_Extension_Pack-4.0.8-71778.vbox-extpack VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.0.8-71778.vbox-extpack
Changing the DVD drive ISO
First, unmount the image by running:
VBoxManage storageattach "WindowsXP" --storagectl "IDE Controller" --port 0 --device 1 --type dvddrive --medium emptydrive
then remount the drive as shown above.