VirtualBox
Forget VMWare! Get something truly free and open-source: VirtualBox.
Table of Contents
Advantages
The first advantage that the user discovers in Virtualbox is easier setup comparing to VMware.
The configuration is also very simple; everything is configured using nice GUI instead of Perl script.
Finally, the performance is stunning; it works a lot faster than VMware.
To see dot files and dot folders in the Windows host, select "Show hidden files and folders" in the folder options.
Better than VMware for me because:
- no need to change frequency scaling (less noise, less power consumption)
- don't intercept all key events, in particular Ctrl+Alt+arrow, which allows to cycle through desktops without having to go out of the VM first.
Install VirtualBox
Choose the easy route: add the following line to your
/etc/apt/sources.list:
deb http://download.virtualbox.org/virtualbox/debian jaunty non-free
Combine downloading the Sun public key (for apt-secure) and registering it with:
wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add -
To install VirtualBox, do:
sudo aptitude install virtualbox-3.0
Note: Ubuntu users might want to install the dkms package to ensure that
the VirtualBox host kernel modules (vboxdrv, vboxnetflt and
vboxnetadp) are properly updated if the linux kernel version changes
during the next apt-get upgrade.
sudo aptitude install dkms
Configuration
Hard Disks
Choose if you would like to have a growing disk, which will start small and will be growing, as you guest system needs more space, or a fixed size, on which your virtual machine will count with all the available space on disk from the very begining, the first is disk space saver but the second, will make your virtual machine to run faster.
Networking
NAT or Bridge.
Wireless support
Nothing to do. Built in — at least when NAT networking is chosen.
Cloning
Clone a master Virtual image with the following command:
VBoxManage clonevdi Master.vdi Clone.vdi
or just copy your disk and use an undocumented command to assign a new UUID to your new disk:
cp Master.vdi Clone.vdi VBoxManage internalcommands setvdiuuid Clone.vdi
Known errors
A word of caution, after a reboot when trying to start the Windows VM you may get this error:
Unknown error creating VM (VERRHOSTIFINITFAILED). VBox status code: -3100 (VERRHOSTIFINITFAILED).
The fix is simple - you need to manually run "sudo chmod 666 /dev/net/tun" manually - it doesn't seem to work automatically from the rc.local file. If anyone has a solution to this please let me know!
Guest Additions
To install Guest Additions, mount the ISO image on the CD-ROM. In your guest, go on the CD-ROM (D:, for example) and launch the program from there.
Port Forwarding
Set it up
To allow properly setting the port forwarding, first shut down all VirtualBox applications (the virtual machine, VirtualBox GUI, all of it).
VirtualBox must be off when you apply the following.
Warning: make sure the quotes are proper quotes!
VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosns/HostPort" 137 VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosns/GuestPort" 137 VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosns/Protocol" UDP
VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosdgm/HostPort" 138 VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosdgm/GuestPort" 138 VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosdgm/Protocol" UDP
VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosssn/HostPort" 139 VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosssn/GuestPort" 139 VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosssn/Protocol" TCP
Check it
VBoxManage getextradata "WinXPPro-Work" enumerate
Uninstall it
To clear the settings, run this:
VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosns/HostPort" VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosns/GuestPort" VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosns/Protocol"
VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosdgm/HostPort" VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosdgm/GuestPort" VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosdgm/Protocol"
VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosssn/HostPort" VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosssn/GuestPort" VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/netbiosssn/Protocol"
Test
VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/myssh/HostPort" 22 VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/myssh/GuestPort" 22 VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/myssh/Protocol" TCP
VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/mytelnet/HostPort" 25 VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/mytelnet/GuestPort" 25 VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/mytelnet/Protocol" TCP
VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/myssh/HostPort" VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/myssh/GuestPort" VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/myssh/Protocol"
VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/mytelnet/HostPort" VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/mytelnet/GuestPort" VBoxManage setextradata "WinXPPro-Work" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/mytelnet/Protocol"
Network Printing
When using NAT, to be able to print to a network printer from a Windows XP guest, you must setup the printer on the host, share it and connect to it from the guest!
In details:
If you go to add the printer in Control Panel on the Guest XP OS, you select Network Printer then select the "Connect to a printer on the Internet or on a home or office network" option.
In the URL field below that you need to type it in this format.
http://DEFAULTGATEWAY:631/printers/PRINTERNAME
The Default Gateway of my Windows XP OS is "10.0.0.2" and my printer name is "C510", so mine looked like this:
http://10.0.2.2:631/printers/C510
Then after you click Next it will ask you to install the driver for it.
Edit: BTW Make sure that the internet firewall has the port open otherwise it MIGHT not work.
From Francesco
Creation of a WinXP VM with Virtual Box 3.0.4 r50677 All default options except the following.
System
Motherboard
Remove "Floppy" from "Boot Order"
Display
Video Memory
128 MB and "Enable 3D Acceleration"
Hard Disks
"Enable Additional Controller" and change Slot for you master drive from "IDE Primary Master" to "SATA Port 0"
Note – In order to install WinXP on this drive, you will need specific drivers (not included in the WinXP cdrom, need for F6 at setup startup)
Either use the floppy drive image provided or create a WinXP CD containing those drivers.
See http://rotwhiler.wordpress.com/2009/04/25/install-windows-xp-in-virtualbox-using-sata/ and use the F32.IMA floppy image provided here.
Network
Adapter 1
"Attached to:" "Bridged Adapter" and select the correct name of the adapter.