Tag: VirtualBox

  • Install VirtualBox 6.1 on Ubuntu 18.04

    Install VirtualBox 6.1 on Ubuntu 18.04

    First you need to add VirtualBox repository

    sudo echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib" > /etc/apt/sources.list.d/virtualbox.list
    

    Add Keys

    wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
    wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
    

    Do an apt upgrade

    sudo apt-get update
    

    If you have older version of VirtualBox installed, remove it

    sudo apt remove virtualbox virtualbox-dkms virtualbox-qt
    

    Install VirtualBox 6.1 with

    sudo apt-get install virtualbox-6.1
    

    VirtualBox 6.1 on Ubuntu

    If you use Vagrant, you may need to install latest version as the vagrant provided by ubuntu won’t work with VirtualBox 6.1

  • VirtualBox Ubuntu Shared Folder

    Once you shared a folder in VirtualBox with Ubuntu Guest, you need to install VirtualBox Guest additions, this can be done from menu.

    Devices > Insert Guest Additions CD image
    

    Once this is done, in your Guest OS, you will see a CD rom, install the provided software.

    Before you can use shared folder, you need to add the user you use to group vboxsf, to do this, run following command in terminal.

    sudo usermod -G vboxsf -a $USER
    

    $USER is user name of the user you will be using. You can replace it with any user you will be using to access the shared folder.

  • Oracle VM VirtualBox

    VirtualBox Ubuntu Shared Folder

    VirtualBox allow you to create Virtual Machines. This is useful for testing.

    Here is some useful CLI commands

    To list all VMS

    vboxmanage list vms
    

    To list currently running vms

    vboxmanage list runningvms
    

    To start a VM

    vboxmanage startvm VM_NAME_OR_ID
    

    To start a VM in background

    vboxmanage startvm --type headless VM_NAME_OR_ID
    

    To poweroff a VM

    vboxmanage controlvm VM_NAME_OR_ID poweroff