# For debian $ sudo apt-get install virtualbox-ose # For redhat $ sudo yum install VirtualBox-OSEOtherwise you can download the source and compile it from http://www.virtualbox.org/
# Register the vm's name VBoxManage createvm --name "Windows" --register # setup the memory/acpi and boot device for the VM VBoxManage modifyvm "Windows" --memory 512 --acpi on --boot1 dvd # This command will make a brided NIC to the real network eth0 # you can then dedicated IP address for the VM VBoxManage modifyvm "Windows" --nic1 bridged --bridgeadapter1 eth0 # OR This will make a NATed NIC, to which you will have to forward ports VBoxManage modifyvm "Windows" --nic1 nat # Make the nic an intel device VBoxManage modifyvm "Windows" --nictype1 82540EM # Enable IOAPCI VBoxManage modifyvm "Windows" --ioapic on # give the vm a hard disk VBoxManage storagectl "Windows" --name="IDE Controller" --add ide VBoxManage createvdi --filename "WindowsXP-disk01.vdi" --size 10000 --register VBoxManage modifyvm "Windows" --hda "WindowsXP-disk01.vdi" # and a dvd drive containg the install media VBoxManage storageattach Windows --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium /path/to/iso # Eject the dvd VBoxManage storageattach Windows --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium emptydrive # display some info about he vm VBoxManage showvminfo "Windows" --details
VBoxHeadless --startvm "Windows" --vnc --vncport 12345 --vncpass passwordYou can now connect to it using VNCViewer