====== VirtualBox ======
http://www.virtualbox.org/wiki/User_HOWTOS
http://www.virtualbox.org/wiki/Linux_Downloads
http://www.virtualbox.org/wiki/Downloads
http://www.oracle.com/technetwork/server-storage/virtualbox/downloads
===== Comments =====
:!: Virtualbox is an excellent workstation virtualization solution.
:!: If you need server virtualization, see:
**[[virtualization:xenserver:xenserver|XenServer]]**
**[[virtualization:proxmox|Proxmox Virtualization Environment]]**
* Two versions
* Open Source Edition
* Personal Edition
* Excellent cross-platform support - Linux, Windows, OS X, Solaris, etc.
* Supports USB 2.0
* No hardware virtualization support needed, similar to VMware Server
* Can be run headless and accessed via VRDP protocol
* Can use various virtual disk formats - VMware .vmdk, etc.
* The default 'host key' to release keyboard is Right Ctrl
===== Documentation =====
Well organized manual/brochure/quick-start guide: http://www.virtualbox.org/manual/UserManual.html
===== Installation =====
==== SME Server ====
http://wiki.contribs.org/VirtualBox_4.0_on_SME_Server_v8_beta_6
==== Linux ====
=== Permissions ===
Add your user to the 'vboxusers' group:
sudo usermod -a -G vboxusers yourusername
Log out and back in to gain permissions.
=== USB Support ===
Download and install the VirtualBox Extension Pack. You can just double-click the file after VirtualBox is installed.
https://www.virtualbox.org/wiki/Downloads
=== Fedora ===
su -
cd /etc/yum.repos.d/
wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
yum install gcc kernel-headers kernel-devel dkms VirtualBox-4.2
=== Ubuntu ===
https://help.ubuntu.com/community/VirtualBox
== Open Source Edition ==
sudo apt-get install dkms build-essential linux-headers-`uname -r` virtualbox-ose
== Personal Edition ==
sudo apt-get install dkms build-essential linux-headers-`uname -r` virtualbox-4.2
===== Shared Folders (Guest-Host) =====
Install Guest Additions (tools), then view the "Entire Network", or browse or search to:
\\vboxsvr
===== Guest Virtual Machines =====
==== Windows XP Guest ====
* You probably don't need more than 1 vCPU and 512MB RAM
* You can get by with as ittle as 8GB of disk space
=== Guest Additions ===
Mount Windows Tools ISO and run:
d:\setup.exe /c
==== CentOS Guest ====
If it won't boot, edit the System setting to "Enable IO APIC".
=== Network Install ===
:!: Using network installation, you are assured of installing a Xen PV kernel.
[[computing:linux:minimal_centos_install#netinstall|CentOS Network Install]]
=== Guest Additions ===
http://forums.virtualbox.org/viewtopic.php?f=3&t=15679
sudo yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel
Devices -> Install Guest Additions
In VM:
mount /media/cdrom
cd /media/cdrom
sudo sh ./VBoxLinuxAdditions-x86.run
or
sh sudo sh ./VboxLinuxAdditions-amd64.run
==== Ubuntu Guest ====
=== Guest Additions ===
http://forums.virtualbox.org/viewtopic.php?f=3&t=15679
sudo apt-get install build-essential linux-headers-`uname -r`
==== Debian Guest ====
=== Guest Additions ===
http://virtualboxes.org/doc/installing-guest-additions-on-debian/
As ''root'':
apt-get install build-essential module-assistant
m-a prepare
mount /media/cdrom
sh /media/cdrom/VBoxLinuxAdditions.run
===== Configuration =====
==== Network ====
Network configuration defaults to DHCP and NAT, which should give you Internet access and a 10.0.x.x IP address, but no access to the VM from the local network. It's easy to set to bridged in Network settings and restart VM.
===== Maintenance =====
==== Host Kernel Upgrade ====
Rebuild the kernel module:
sudo /etc/init.d/vboxdrv setup
==== Compact a VM Disk ====
http://www.maketecheasier.com/shrink-your-virtualbox-vm/
http://download.sysinternals.com/Files/SDelete.zip
- Defrag the disk within the VM
* maybe more than once
- Zero out the empty space within the VM
* Windows: ''sdelete -z c:''
* Linux: ''zerofree /dev/sda1''
- Shut down the VM cleanly
- ''VboxManage modifyvdi /path/to/your/VM.vdi compact''
==== VMware VM ====
:!: I'm not convinced moving VMs from one virtualization platform to another is a "good idea". I have generally found it faster to reinstall a VM clean. It's analogous to doing upgrades to host operationg systems...it can be done, but it's probably not going to work as well as you might hope.
http://www.virtualbox.org/wiki/Migrate_Windows
* It's best to uninstall VMware Tools first before exporting the VM from VMware
* Most VMware drivers will work under VirtualBox
* You will have to reactivate Windows
* You will probably have to Enable IO APIC to get the VM to boot
* You may need to set the Network Adapter to Bridged mode
* You will need to uninstall the VMware Tools
* You will need to install the Virtualbox Guest Additions
* You will need to get USB working in the VM
* There is a VMware cleaner utility to help
* http://kb.vmware.com/kb/1308
* Use a USB memory key to transfer the utility
* You may still have problems with the NIC
==== Convert VMDK to VDI Disk Image ====
If your VMware virtual disk is comprised of multiple .vmdk files, you have to reorganize it into a single file. We use a tool from VMware Server and one from Qemu:
vmware-vdiskmanager -r vm-name.vmdk -t 0 temp.vmdk
sudo apt-get install qemu
qemu-img convert temp.vmdk temp.bin
VBoxManage convertdd temp.bin new-hardive-name.vdi
==== NIC Driver (am79C973) ====
Device Manager -> Right-Click VMware NIC -> Update Driver -> Install From List -> Don't Search -> AMD PCNET Family PCI Ethernet Adapter
http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_6629_2403%5E2415%5E2454%5E2486,00.html
===== Virtual Disk Files =====
http://www.liucougar.net/blog/archives/118
File -> Import
File -> Export
===== Headless =====
http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,40/func,view/id,2834/