Table of Contents

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:

XenServer

Proxmox Virtualization Environment

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

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.

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

  1. Defrag the disk within the VM
    • maybe more than once
  2. Zero out the empty space within the VM
    • Windows: sdelete -z c:
    • Linux: zerofree /dev/sda1
  3. Shut down the VM cleanly
  4. 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

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/