Skip to main content

Virtual machine

Using virtual machine instead of dual boot to try out Linux on host systems.

Host systems

Virtual Box supports Mac, Windows and Linux host systems, this tutorial focuses on installing Ubuntu 20.04 on Windows (Win10) host system.

Installers needed:
  • VirtualBox installer
  • Ubuntu20.04.4 installation image ISO

Download VirtualBox Installer

Get the latest VirtualBox from its official website, when this tutorial post, the latest version is 6.1.34.

VirtualBox 6.1.34 platform packages Windows hosts (About 100M)

Double click the installer file to install VirtualBox.

Download Ubuntu 20.04 ISO

Get Ubuntu from its official website for Ubuntu 20.04 image ISO. Download

Creating Ubuntu Virtual Machine in VirtualBox

Create a virtual machine

Create a virtual machine

Create a virtual machine by clicking "New" icon.

VirtualBox1

Hardware Configuration

Set number of CPUs
  • Two or more are recommended, choose a feasible number of CPUs with respect to the actual hardware of the host computer.

VirtualBox21

Memory Size
  • 4096MB or more recommended
  • Choose a feasible amount so that the performance of the host computer still works well.

VirtualBox22

Change the virtual hard disk solution
  • If the VM is only used for Steamania JoyKit, an HDD with 10GB volume is recommended.
  • If choose dynamic allocation, the HDD file will be dynamically occupied (Max. 10GB)
  • If choose fixed allocation, the HDD file will be fixed 10GB, but the read/write of HDD will be faster than that in dynamic allocation.

VirtualBox23

Mount the Ubuntu Installation ISO in VM CD/DVD Drive

ISO image
  • Mount the installation ISO in virtual machine configuration
  • Boot the virtual machine

VirtualBox3

Ubuntu Installation

Major steps
  • Reach to Install/Try Ubuntu dialog
  • Choose "Install Ubuntu"
  • Choose Language English
  • In the following Updates and other software dialog, choose Minimal installiation
  • In Installation Type dialog,select Erase disk and install Ubuntu
  • Take the correct time zone
  • Set user name and password
  • Disconnect the ISO image file and reboot the virtual machine

VirtualBox4

Screenshots for key steps

VirtualBox5 VirtualBox5 VirtualBox5 VirtualBox5 VirtualBox5 VirtualBox5 VirtualBox5 VirtualBox5

Install Essential Development Tools in Ubuntu

Open a terminal window through combo keys Ctrl + Alt + T and type in:
sudo apt install build-essential 
  • Type the password and continue with "Enter" key

Installing VirtualBox Guest Additions

Install VirtualBox Guest Additions through menu on the top.
  • Guest additions allow mouse pointer sharing between host and VM, dynamic resolution and so on.

Share Serial USB module with VM Ubuntu

Add serial module to the VM
  • Connect the USB module and share it with the VM
  • Type:
ls /dev/ttyUSB*  or  ls /dev/ttyACM* 
  • Text similar with ttyUSB0 or ttyACM0 should be displayed in the terminal window, if succeeded.

VirtualBox8

Adding the Current User to dialout group

Give current user permission to access the USB serial module in Ubuntu.
sudo usermod -a -G dialout steamania
  • Reboot Ubuntu to make the change work.