Recipe: Set up a Ubuntu Linux virtual workstation with VirtualBox on any x86_64 system

/docs/other/developer-workstation/ubuntu-x86_64/virtualbox/

Note

In our experience, VirtualBox on ARM is currently not mature enough yet to be used, so use this recipe for on x86_64 hosts only. It should work on all x86_64 platforms supported by VirtualBox, including Linux, Mac and Windows.

Install VirtualBox

  1. Download and install VirtualBox if you have not done so already.

Note

On some Linux distros, VirtualBox may be available through package repositories, which might make installation and management easier.

Obtain a Ubuntu Linux image

  1. Download Ubuntu Desktop from https://ubuntu.com/download/desktop. This should be a .iso file.

Run the Ubuntu Linux easy install process

  1. Run VirtualBox.

  2. In VirtualBox, create a new virtual machine:

    • Click “New”.

    • In section “Virtual machine Name and Operating System”:

      • Enter a suitable name, such as “ubosdev”.

      • ISO Image: select the ISO image you downloaded.

      • The Type (“Linux”), Subtype (“Ubuntu”) and Version (“Ubuntu (64-bit)”) should be filled-in automatically.

      • Select “Skip Unattended Installation”.

      • Click “Next”.

    • In section “Hardware”:

      • A suitable amount of base memory and CPUs, depending on your needs, such as 4096 MB and 2 CPUs.

      • Leave “Enable EFI (special OSes only)” unchecked.

      • Click “Next”.

    • Section “Virtual Hard Disk”:

      • “Create a Virtual Hard Disk Now”…

      • …with a size suitable for your needs, such as 60 GB. This only means the disk may grow up to 60GB, not that it starts out that large.

      • Do not check “Pre-allocate Full Size”

      • Click “Finish”.

  3. Click “Start” to start the virtual machine, accept the defaults in the boot loader (or just wait) and wait until the boot sequence ends and the graphical Ubuntu installer appears.

Fill out the “Welcome to Ubuntu” wizard

  1. Make your choices in “Choose your language”.

  2. Make your choices in “Accessibility in Ubuntu”.

  3. Make your choices in “Select your keyboard layout”.

  4. In “Connect to the internet”, chose “Use wired connection”.

  5. In “What do you want to do with Ubuntu?” select “Install Ubuntu”. Click “Next”.

  6. In “How would you like to install Ubuntu?” select “Interactive installation”. Click “Next”.

  7. In “What apps would you like to install to start with?” select “Default selection”. Click “Next”.

  8. In “Install recommended oproprietary software?”, accept the defaults (no proprietary third-party software). Click “Next”.

  9. In “How do you want to install Ubuntu?”, select “Manual installation”. Click “Next”.

  10. In “Manual partitioning”:

    1. Create a boot loader partition:

      • Select “Free space” below device sda.
      • In the “Device for boot loader installation”, popup, select the only option.
    2. Create a main partition

      • Select “Free space” below device sda1.
      • Click the “+”
      • In “Create partition”:
        • Leave the default Size unchanged.
        • In the “Used as” popup, select “Btrfs”.
        • For “Mount point”, enter “/”
        • Click “OK”.
    3. Click “Next”.

  11. In “Create your account”:

    • Enter suitable information, such as “ubosdev” for “Your name”, “Your computer’s name” and “Your username”.

    • Set a password.

    • Uncheck “Require my password to log in”.

    • Click “Next”.

  12. In “Select your timezone”, set suitable data. Click “Next”.

  13. In “Review your choices”, click “Install”.

  14. After a while, the screen changes to “Installation complete”. Click “Restart now”.

Install VirtualBox tools

  1. After reboot, select “Devices” / “Insert Guest Additions CD Image” and then run the software on the virtual CD. You may need to install a few packages first:

    % sudo apt install bzip2 gcc make
    
  2. Reboot again. You should now be able to copy-paste between host and virtual machine, share directories between them, and resize the VM window.