User Tools

Site Tools


virtualization:virtualbox

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
virtualization:virtualbox [2012/04/22 16:26]
gcooper
virtualization:virtualbox [2014/04/23 15:04] (current)
gcooper
Line 8: Line 8:
  
 http://www.oracle.com/technetwork/server-storage/virtualbox/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   * Two versions
     * Open Source Edition     * Open Source Edition
-      <file>sudo apt-get install virtualbox-ose</file> +    Personal Edition 
-    * Commercial Edition +  Excellent cross-platform support Linux, Windows, OS X, Solaris, etc
-      add repo to sources.list +  * Supports USB 2.0
-      * <file>sudo apt-get install virtualbox-4.1</file> +
-  * 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   * No hardware virtualization support needed, similar to VMware Server
   * Can be run headless and accessed via VRDP protocol   * Can be run headless and accessed via VRDP protocol
-  * Can use VMware virtual disks +  * Can use various virtual disk formats - VMware .vmdk, etc. 
-  * Doing so will require Windows XP re-activation +  * The default 'host key' to release keyboard is Right Ctrl
-  * 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 ===== ===== Documentation =====
Line 33: Line 35:
 ===== Installation ===== ===== Installation =====
  
-==== Ubuntu ====+==== SME Server ====
  
-https://help.ubuntu.com/community/VirtualBox+http://wiki.contribs.org/VirtualBox_4.0_on_SME_Server_v8_beta_6
  
-<file> +==== Linux ====
-sudo apt-get install dkms build-essential linux-headers-`uname -r` +
-</file>+
  
-Download and install .deb from http://www.virtualbox.org/wiki/Linux_Downloads.+=== Permissions ===
  
 Add your user to the 'vboxusers' group: Add your user to the 'vboxusers' group:
Line 51: Line 51:
 Log out and back in to gain permissions. Log out and back in to gain permissions.
  
-===== Configuration =====+=== USB Support ===
  
-==== Network ====+Download and install the VirtualBox Extension Pack.  You can just double-click the file after VirtualBox is installed.
  
-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.+https://www.virtualbox.org/wiki/Downloads
  
-===== Maintenance ===== +=== Fedora ===
- +
-==== Host Kernel Upgrade ====+
  
-Rebuild the kernel module:+<file> 
 +su - 
 +cd /etc/yum.repos.d/ 
 +wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
  
-<file> +yum install gcc kernel-headers kernel-devel dkms VirtualBox-4.2
-sudo /etc/init.d/vboxdrv setup+
 </file> </file>
  
-==== Compact a VM Disk ====+=== Ubuntu ===
  
-http://novemberechoromeodelta.com/20081220-shrinking-virtualbox-vdi-files+https://help.ubuntu.com/community/VirtualBox
  
-http://download.sysinternals.com/Files/SDelete.zip+== Open Source Edition ==
  
-Defrag the disk within the VM.+<file> 
 +sudo apt-get install dkms build-essential linux-headers-`uname -r` virtualbox-ose 
 +</file>
  
-==== 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.+== Personal Edition ==
  
-http://www.virtualbox.org/wiki/Migrate_Windows+<file> 
 +sudo apt-get install dkms build-essential linux-headers-`uname -r` virtualbox-4.
 +</file>
  
-  * You will have to reactivate Windows +===== Shared Folders (Guest-Host) =====
-  * 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 ==== +Install Guest Additions (tools), then view the "Entire Network"or browse or search to:
- +
-If your VMware virtual disk is comprised of multiple .vmdk filesyou have to reorganize it into a single file.  We use a tool from VMware Server and one from Qemu:+
  
 <file> <file>
-vmware-vdiskmanager -r vm-name.vmdk -t 0 temp.vmdk  +\\vboxsvr
-sudo apt-get install qemu +
-qemu-img convert temp.vmdk temp.bin +
-VBoxManage convertdd temp.bin new-hardive-name.vdi+
 </file> </file>
  
-==== NIC Driver (am79C973) ====+===== Guest Virtual Machines =====
  
-Device Manager -> Right-Click VMware NIC -> Update Driver -> Install From List -> Don't Search -> AMD PCNET Family PCI Ethernet Adapter+==== Windows XP Guest ====
  
-http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_6629_2403%5E2415%5E2454%5E2486,00.html+  * You probably don't need more than 1 vCPU and 512MB RAM 
 +  * You can get by with as ittle as 8GB of disk space
  
-===== Centos Guest =====+=== Guest Additions === 
 + 
 +Mount Windows Tools ISO and run: 
 + 
 +<file> 
 +d:\setup.exe /c 
 +</file> 
 + 
 +==== CentOS Guest ====
  
 If it won't boot, edit the System setting to "Enable IO APIC". If it won't boot, edit the System setting to "Enable IO APIC".
  
-==== Network Install ====+=== Network Install === 
 + 
 +:!: Using network installation, you are assured of installing a Xen PV kernel.
  
 [[computing:linux:minimal_centos_install#netinstall|CentOS Network Install]] [[computing:linux:minimal_centos_install#netinstall|CentOS Network Install]]
  
-==== Linux Guest Additions ====+=== Guest Additions ===
  
 http://forums.virtualbox.org/viewtopic.php?f=3&t=15679 http://forums.virtualbox.org/viewtopic.php?f=3&t=15679
- 
-<file> 
-sudo apt-get install build-essential linux-headers-`uname -r` 
-</file> 
- 
-or 
  
 <file> <file>
Line 134: Line 128:
  
 In VM: In VM:
 +
 <file> <file>
- 
 mount /media/cdrom mount /media/cdrom
  
Line 151: Line 145:
 </file> </file>
  
-===== Virtual Disk Files =====+==== Ubuntu Guest ====
  
-http://www.liucougar.net/blog/archives/118+=== Guest Additions ===
  
-File -> Import +http://forums.virtualbox.org/viewtopic.php?f=3&t=15679
-File -> Export+
  
-===== Windows XP Guest =====+<file> 
 +sudo apt-get install build-essential linux-headers-`uname -r` 
 +</file>
  
-Force uninstall VMware Tools:+==== Debian Guest ====
  
-Mount Windows Tools ISO and run:+=== Guest Additions === 
 + 
 +http://virtualboxes.org/doc/installing-guest-additions-on-debian/ 
 + 
 +As ''root'':
  
 <file> <file>
-d:\setup.exe /c+apt-get install build-essential module-assistant 
 + 
 +m-a prepare 
 + 
 +mount /media/cdrom 
 + 
 +sh /media/cdrom/VBoxLinuxAdditions.run
 </file> </file>
  
-Manually delete +===== Configuration =====
  
-Shared folders:+==== Network ====
  
-Install Guest Additions (tools), then view the "Entire Network"or browse or search to:+Network configuration defaults to DHCP and NATwhich 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:
  
 <file> <file>
-\\vboxsvr+sudo /etc/init.d/vboxdrv setup
 </file> </file>
 +
 +==== 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:
 +
 +<file>
 +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
 +</file>
 +
 +==== 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 ===== ===== Headless =====
virtualization/virtualbox.1335133586.txt.gz · Last modified: 2012/04/22 16:26 by gcooper