Thursday, August 27, 2015

Setting up Ubuntu Linux VM in VirtualBox

1. Download and install Oracle VirtualBox for Windows 10
Windows 10 is not officially supported so this test build is available of the most recent stable build of Oracle VirtualBox 5.0.2 with some bug fixes for Windows 10.

2. Download and install Oracle VirtualBox Extension pack
Extension pack extends the functionality of VirtualBox  base package (like adding support for USB 2.0, 3.0 devices, RDP, webcam passthrough, PXE boot ROOM support etc).

Note: One can verify that extension pack has installed correctly by checking VirtualBox -> Preferences -> Extensions.

3. Create a new VM in VirtualBox with the following specs:
  • OS – Ubuntu Linux x86-64 (Note: For VirtualBox to show 64 bit OS options you need to ensure that “Virtualization Technology VT-x” option in the system BIOS has been enabled. By default it is disabled and in which case VirtualBox will only show 32 bit OS options for a new VM).
  • CPU – 1
  • Memory – 1024 MB (give more if you want to use the VM for development)
  • Network – Bridge Adapter (instead of NAT so it uses the host OS network interface for internet connection)
  • Virtual HDD – 12 GB (Dynamically allocated – slower but won’t occupy the entire 12 GB from the very beginning and will grow as we install the OS and use the VM). If you want better performance then use Fixed allocation which will take sometime to format and setup).
 4. Download Ubuntu Linux 64 bit Desktop iso image from 

5. Associate the iso image as a virtual CD ROM drive to the VM and install OS in the VM. 

When it starts up the resolution of the Ubuntu OS will not be good. To fix that, do the following (excerpted from
  1. Update Virtualbox to the latest version (currently 4.3.24)
  2. In Terminal in the Guest system type:

    sudo apt-get install dkms
    sudo apt-get install build-essential module-assistant
    sudo m-a prepare
If you have no top menu in the Guest system, it's because you're in scale mode which causes it to be hidden. In that case, press Host + C to toggle scale mode (where Host is Right Control by default)
  1. In the Guest system, go to the top menu, and click Devices->Insert Guest Additions CD Image. This should mount the CD image. Install the guest additions and then a restart the VM. Post the restart the resolution should be 1920x1080 (assuming your monitor supports it). Then you can go full screen mode.

No comments:

15 sorting algorithms visualized in 5 minutes, with awesome arcade sounds

15 sorting algorithms visualized in 5 minutes, with awesome arcade sounds from r/programming