Benutzer-Werkzeuge

Webseiten-Werkzeuge


pc:virtualbox

VirtualBox

VM usage

  • Start VM (headless):
    VBoxHeadless --startvm "ExampleLinux86" &

    or

    VBoxManage startvm "ExampleLinux86" --type headless &
  • Shutdown VM:
    VBoxManage controlvm "ExampleLinux86" acpipowerbutton

    May require package acpid on VM Guest OS.

  • Stop VM:
    VBoxManage controlvm "ExampleLinux86" poweroff

    Beware: this does not shutdown VM properly!

  • Reset VM:
    VBoxManage controlvm "ExampleLinux86" reset


  • Show VM's:
    VBoxManage list vms
  • Show running VM's:
    VBoxManage list runningvms
  • Change VRDE (Remotedesktop) Port:
    VBoxManage modifyvm "ExampleLinux86" --vrdeport 3390


  • Show VM details:
    VBoxManage showvminfo "ExampleLinux86" --details


  • Remove VM:
    VBoxManage unregistervm "ExampleLinux86" --delete

    Beware: This also deltes all Files !


  • Add Medium:
    VBoxManage storageattach "ExampleLinux86" --storagectl "IDE-Controller" --port 1 --device 0 --type dvddrive --medium /usr/share/virtualbox/VBoxGuestAdditions.iso
  • Remove Medium:
    VBoxManage storageattach "ExampleLinux86" --storagectl "IDE-Controller" --port 1 --device 0 --type dvddrive --medium none


  • Send <CTRL>+<ALT>+<DEL> via RDP: press <CTRL>+<ALT>+<END>

Install VirtualBox on Linux Ubuntu 10.04

Source: http://wiki.ubuntuusers.de/VirtualBox/Installation

  • Import VirtualBox apt-key:
    sudo wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
  • Add VirtualBox Packet Source:
    sduo echo "deb http://download.virtualbox.org/virtualbox/debian `lsb_release -cs` contrib" >> /etc/apt/sources.list
  • Update apt:
    sudo apt-get update
  • Install VirtualBox:
    sudo apt-get install virtualbox-4.1 dkms

    Usergroup „vboxusers“ will be created by apt. VirtualBox 4.1.18 or newer will be installed.

  • Add current user to vboxusers Group:
    sudo adduser $USER vboxusers

    or create user vbox

Manage VirtualBox Extension Pack

List Extension Pack

$ VBoxManage list extpacks
Extension Packs: 2
Pack no. 0:   VNC
Version:      4.3.36
Revision:     105129
Edition:
Description:  VNC plugin module
VRDE Module:  VBoxVNC
Usable:       true
Why unusable:

Pack no. 1:   Oracle VM VirtualBox Extension Pack
Version:      4.3.36
Revision:     105129
Edition:
Description:  USB 2.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM with E1000 support.
VRDE Module:  VBoxVRDP
Usable:       true
Why unusable:

Install VirtualBox Extension Pack / RDP

  • Check your VirtualBox Version
    VBoxManage --version
    4.3.36_Debianr105129
  • Download Extension Pack for your VirtualBox Version: http://download.virtualbox.org/virtualbox/
  • Install Extension Pack:
    sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.36-105129.vbox-extpack
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Successfully installed "Oracle VM VirtualBox Extension Pack".

    Read: http://www.virtualbox.org/manual/ch08.html#vboxmanage-extpack

  • Enable RDP for your VM:
    VBoxManage modifyvm "ExampleLinux86" --vrde on

Uninstall RDP / VRDP

sudo VBoxManage extpack uninstall "Oracle VM VirtualBox Extension Pack"
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully uninstalled "Oracle VM VirtualBox Extension Pack".

Uninstall VNC Extension Pack

sudo VBoxManage extpack uninstall VNC
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully uninstalled "VNC".

Install phpVirtualbox

Install vboxtool

Provides effective control of virtual machines of VirtualBox on a Linux headless server like autostart and more: http://vboxtool.sourceforge.net/

Download VBoxGuestAdditions ISO

Debian

  1. Add non-free Package Repository
  2. sudo wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
  3. sudo apt-get install virtualbox-guest-additions-iso
  4. VBoxGuestAdditions.iso will be installed to /usr/share/virtualbox/VBoxGuestAdditions.iso
  5. Attach ISO to VM
  6. Install GuestAdditions in VM

Download ISO

Create VM

Linux Guest OS 32-Bit

  • Create new VM:
    VBoxManage createvm --name "ExampleLinux86" --register
  • Set OS Type:
    VBoxManage modifyvm "ExampleLinux86" --ostype Linux26

    See VBoxManage list ostypes for available ostypes.

  • Some settings:
    VBoxManage modifyvm "ExampleLinux86" --memory 512 --acpi on
    VBoxManage modifyvm "ExampleLinux86" --boot1 dvd
    VBoxManage modifyvm "ExampleLinux86" --nic1 bridged --bridgeadapter1 eth0
  • Add Storage (IDE or SATA) Controller:
    VBoxManage storagectl "ExampleLinux86" --name "IDE-Controller" --add ide
  • Create Virtual Disk:
    cd ~/VirtualBox\ VMs/ExampleLinux86/ && VBoxManage createhd --filename disk1.vdi --size 10000
  • Attach Virtual Disk:
    VBoxManage storageattach "ExampleLinux86" --storagectl "IDE-Controller" --port 0 --device 0 --type hdd --medium disk1.vdi
  • Attach ISO as virtual DVD Drive:
    VBoxManage storageattach "ExampleLinux86" --storagectl "IDE-Controller" --port 1 --device 0 --type dvddrive --medium /home/example/linux.iso

Optimise VM Performance

  • Use SATA Storage Controoller instead of IDE for your Virtual Disk
  • Windows Guest: Defrag your Harddisk.

Move VMware VMDK to VirtualBox

Convert VMDK to RAW

Download Qemu for Windows (Qemu 1.0.1 or newer): http://lassauge.free.fr/qemu/

Convert VMware Virtual Disk (VMDK) to RAW Disk Image:

c:\example_vm>qemu-img.exe convert disk1.vmdk disk1.raw

Beware: Raw Disk Image will be as large as the virtual Partition inside VMDK !

Convert RAW to VDI

Download and install VirtualBox for Windows (VirtualBox 4.1.18 or newer): http://www.virtualbox.org/wiki/Downloads/

c:\example_vm>"C:\Program Files\Oracle\VirtualBox\vboxmanage.exe" convertfromraw disk1.bin disk1.vdi --format VDI
pc/virtualbox.txt · Zuletzt geändert: 2016/09/19 00:26 von pixeldoc