User Tools

Site Tools


virtualization:virtualbox

This is an old revision of the document!


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

:!: Virtualbox is an excellent workstation virtualization solution.

:!: If you need server virtualization, see:

XenServer Proxmox Virtualization Environment

  • Two versions
    • Open Source Edition
      • sudo apt-get install virtualbox-ose
    • Commercial Edition
      • add repo to sources.list
      • sudo apt-get install virtualbox-4.1
  • Install Extension Pack for USB 2.0 support in VM
  • Both versions free for personal use.
  • No hardware virtualization support needed, similar to VMware Server
  • Can be run headless and accessed via VRDP protocol
  • Can use VMware virtual disks
  • Doing so will require Windows XP re-activation
  • It's best to uninstall VMware Tools first
  • Most VMware drivers will work under VB
  • Had network problems
  • default 'host key' to release keyboard is Right Ctrl
  • Didn't work out too well on Fedora 11

Documentation

Well organized manual/brochure/quick-start guide: http://www.virtualbox.org/manual/UserManual.html

Installation

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

Shared Folders

Install Guest Additions (tools), then view the “Entire Network”, or browse or search to:

\\vboxsvr

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

https://help.ubuntu.com/community/VirtualBox

sudo apt-get install dkms build-essential linux-headers-`uname -r`

Download and install .deb from http://www.virtualbox.org/wiki/Linux_Downloads.

Add your user to the 'vboxusers' group:

sudo usermod -a -G vboxusers yourusername

Log out and back in to gain permissions.

Guest Additions

http://forums.virtualbox.org/viewtopic.php?f=3&t=15679

sudo apt-get install build-essential linux-headers-`uname -r`

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

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

  • 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
  • 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

virtualization/virtualbox.1335134502.txt.gz · Last modified: 2012/04/22 16:41 by gcooper