To install a headless VirtualBox on an Ubuntu-host, follow this guide from burnz.
1. On the headless server, create a new virtual machine:
--- OPTIONAL EXTRAS ---
To easy start, stop, autostart one or more VMs install Vboxtool from http://sourceforge.net/projects/vboxtool/
On my Ubuntu-host I had problems with kvm-intel, and VirtualBox would not start. I had to remove the driver from the kernel with:
1. On the headless server, create a new virtual machine:
VBoxManage createvm --name "Windows XP" --ostype WindowsXP --registerNote that you do not need to specify --ostype, but doing so selects some sane default values for certain VM parameters, for example the RAM size and the type of the virtual network device. To get a complete list of supported operating systems you can use:
VBoxManage list ostypes2. Make sure the settings for this VM are appropriate for the guest operating system that we will install. For example:
VBoxManage modifyvm "Windows XP" --memory 256 --acpi on --boot1 dvd --nic1 nat --vrdpmulticon on --accelerate3d on3. Create a virtual hard disk for the VM (in this case, 10GB in size):
VBoxManage createhd --filename "WinXP.vdi" --size 100004. Add an IDE Controller to the new VM:
VBoxManage storagectl "Windows XP" --name "IDE Controller" --add ide --controller PIIX45. Set the VDI file created above as the first virtual hard disk of the new VM:
VBoxManage storageattach "Windows XP" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium "WinXP.vdi"6. Attach the ISO file that contains the operating system installation that you want to install later to the virtual machine, so the machine can boot from it:
VBoxManage storageattach "Windows XP" --storagectl "IDE Controller" --port 0 --device 1 --type dvddrive --medium /full/path/to/WinXP.iso7. Start the virtual machine using VBoxHeadless:
VBoxHeadless --startvm "Windows XP"If everything worked, you should see a copyright notice. If, instead, you are returned to the command line, then something went wrong. You can list all registered machines with:
VBoxManage list vms
--- OPTIONAL EXTRAS ---
To easy start, stop, autostart one or more VMs install Vboxtool from http://sourceforge.net/projects/vboxtool/
On my Ubuntu-host I had problems with kvm-intel, and VirtualBox would not start. I had to remove the driver from the kernel with:
sudo rmmod kvm-intelAnd then rebuild the VBox-driver:
sudo /etc/init.d/vboxdrv setupYou may also try installing dynamic kernel module on the host:
sudo apt-get install dkmsYou can change the boot order of the VM with:
VBoxManage modifyvm "Windows XP" -boot1 dvd -boot2 disk -boot3 floppy -boot4 netLook up virtualbox.org for some additional commands, and here you can download some pre-build images: virtualboxes.org
Kommentarer