Status
As of May 18, 2016 the Ubuntu 16.04 MATE installation described within for VirtualBox 5.0.20 works on Windows, but not on the MAC OSX (10.11.5). I have tried Desktop versions of Ubuntu, Ubuntu MATE and Lubuntu and the graphical installer consistently chokes. I was, however, successful with the Lubuntu alternative distribution (with a non-graphical installer). Go to and download:lubuntu-16.04-alternate-amd64.isoOnce you have this installed, you can then install and use MATE Desktop by:
$ sudo apt-get install mate-desktop-environmentYou won't get everything from an Ubuntu MATE installation, but you'll get the essential features.
Description
When working with virtual machines, the machine in which VirtualBox or other virtualization software is installed is called the host. The virtual machine supported within this virtualization software is called the guest. The document assumes that the host machine is either Windows or MacOSX and the guest is Ubuntu. You should have at least 4GB of RAM on your system. The Ubuntu guests work well when given 1GB of RAM. For sake of definiteness, I will assume VirtualBox 5.0.20 and Ubuntu MATE Desktop 16.04, 64-bit. The Ubuntu Desktop variant is up to you, you just have to adapt my Ubuntu notes to the Desktop version you choose.Enable Virtualization in the BIOS
In order to use "full" virtualization on Windows computers, it may be necessary to enable it in the BIOS. The exact details are different for every system, but you have to reboot the machine and Enter Setup. Move through the tabs looking for something like:
Virtualization Technology
If it indicates Disabled, then you have to change it to Enabled.
Once done, Save and Exit the Setup.
Basic Installation
Download the platform-dependent version of VirtualBox from the VirtualBox site and install it. When you start it up, it should present the option to download and install the VirtualBox 5.0.20 Oracle VM VirtualBox Extension Pack. Follow through the installation of this. Download the ISO installation file, ubuntu-mate-16.04-desktop-amd64.iso, from the Ubuntu MATE site. Move this ISO file where you want to maintain a collection of this and other ISO files.Create the VM
- Click New. You are presented with a dialog
to set basic guest OS features.
The installation docs recommend no less than 512MB for a Desktop installation.
Make these changes:
Name and operating systemClick Create.
Name: VMNAME
Type: Linux
Version: Ubuntu (64-bit)
Memory size
1024 MB -
Next, you are presented with a dialog to set the virtual disk size.
By default it is dynamically allocated, so it doesn't cost much to make it big.
Perhaps something like.
100 GBClick Create.
The Guest Installation
The machine VMNAME should be selected in the virtual machine list. Click Start.- Installation Media Click on the file selection button on the right of the selection list and navigate to the ISO file, ubuntu-mate-16.04-desktop-amd64.iso. Choosing the file should make it appear as the chosen selection in the list. Click Start.
- The boot process should take you to a choice of popups: Try Ubunutu MATE or Install Ubuntu MATE. Choose Install.
-
Preparing to install Ubuntu MATE.
Check both checkboxes:
Download updates whitle installing Ubuntu MATEClick Continue.
Install third-party software for graphics and Wi-Fi hardware, Flash, MP3 and other media -
Installation Type.
Make the choice which represents erasing
the entire disk and installing Ubuntu.
Erase disk and install MATEPress Install Now and Continue at the popup.
- Where are you? Probably the default. For us New York. Press Continue.
- Keyboard Layout. Take the default. Press Continue.
-
Who Are You?
This provides you with a login as a non-root administrative user:
Keep the other default settings. Press Continue to finish the information Ubuntu needs.Your name: your full name (whatever you want) Your computer's name: VMNAME
Replace VMNAME by the machine name given to you.
Ignore any message: "That name already exists on the network."Pick a user name: VMLOGIN
Replace VMLOGIN by a suitable non-root account name on your machine.Choose a password: A password known only to you. Confirm your password: Re-type it. - Welcome to Ubuntu MATE. Wait for the installation to complete and watch the ads go by; the whole process is very short. At the end click the Restart Now button. Press ENTER to confirm reboot and remove the Flash drive.
Adjust Guest Settings Guest
When the reboot is done, log in and shut down the guest machine. We want to adjust some settings in VirtualBox before proceeding.- Click the Settings button for the VMNAME virtual machine.
-
In the Display tab, set the Video Memory to the max (128MB). Then check the boxes:
HiDPI Support: Use Unscaled HiDPI Output Acceleration: Enable 3D Acceleration
-
In the General ⇾ Advanced tab, set
Shared Clipboard:Setting a shared clipboard allows you to copy in the host and paste into the guest, or vice versa. On a MAC, you just have to remember that the guest uses control and host uses command.
-
In the Shared Folders tab, locate and click the Add new shared folder icon on the right.
Decide on a folder on the host which you want to share with the guest, say your Documents folder.
Then set:
Folder Path: /PATH/TO/DocumentsThe Folder Name is what appears in the guest machine. It can be anything you want.
Folder Name: Documents
Read Only
Auto-mount - Click OK to leave the Settings dialog.
Install Guest Additions
It is absolutely necessary that you do this step. Start your guest machine. The required package installation is:$ sudo apt-get install build-essentialFrom the VirtualBox menu select:
Devices ⇾ Install Guest Additions
When you log in to Ubuntu,
you will see the VBOXADDITIONS_version CD icon on your desktop which indicates
that this "CD" is mounted. You may be able to do everything by point and click, but
this shell-based method always works:
- Open a terminal shell.
-
Navigate to the mounted directory (use tab completion!):
$ cd /media/VMLOGIN/VBOXADDITIONS_version
-
Then run the guest additions installer:
$ sudo ./VBoxLinuxAdditions.run
sf_SharedFolderNameTo permit access to this shared folder, you have to add yourself to the vboxsf group like this:
$ sudo adduser VMLOGIN vboxsfYou have to log out and log back in for this to take effect. Upon logging in, open the shared folder to reveal the documents on the host side.
Subsequent Guest Addition Installations
If you update VirtualBox and possibly update the Ubuntu kernel you need to reinstall the Guest additions:$ cd /media/VMLOGIN/VBOXADDITIONS_version $ sudo ./VBoxLinuxAdditions.run $ sudo rebootYou'll often get a visual cue of this need if the window doesn't resize or the shared folder doesn't appear.
Network connection between host & guest
This section is not absolutely necessary, but it is great if you want to access on the host services running on the guest, and/or vice-versa.Adjust Settings for Virtual Machine
Power down the guest machine. Edit VirtualBox's Preferences (not Settings). Go to the Network tab and look for a listing ofHost-only Networks: vboxnet0If you do not see this, click the "+" button on the side to add it. Now create the Host-only Adapter network adapter:
- Click the Settings button for the VMNAME virtual machine.
- In the Network tab, click on Adapter 2, check Enable Network Adapter and select Host-only Adapter in the Attached to selection list.
- Click OK to leave the Settings dialog.
Confirm the vboxnet0 network address
On your host machine, open a terminal shell and run either ifconfig (Mac) or ipconfig (Windows) and look for the interface:VirtualBox Host-Only NetworkHopefully, the IP4 information associated with this is
address: 192.168.56.1 netmask: 255.255.255.0 or ffffff00
Confirm the DNS IP address on the guest
Go into your Ubuntu guest machine. It is likely that the new network has already been set up on eth1 via DNS. Open a terminal and type:
$ ifconfig
...
enp0s8 Link encap:Ethernet HWaddr .....
inet addr:192.168.56.LAST Bcast:192.168.56.255 Mask:255.255.255.0
...
For the most part, this DHCP-generated IP address is unlikely to change.
Test network connectivity between host and guest
Refer to the DHCP-generated IP address above asGUESTIPFrom the host machine check:
$ ping GUESTIPOpen a shell in the guest (Ubuntu) machine and check:
$ ping 192.168.56.1
Set a static IP address on the guest (optional)
If you're so inclined, you can set a static IP address for this guest. You will need to access the system's Network Manager, wherever it to be found. The network configuration steps should look something like this:- You will have two connections. Examine the Ethernet tab of both to find out which one corresponds to the network interface enp0s8. Choose that one.
- Select the IP4 Settings tab.
- Change Method to Manual.
- Click the Add button below to add a new Address.
- Enter the Address: 192.168.56.10. The first 3 octets must match the vboxnet0 IP address and the last octet must be anything other than 1, probably less than 100.
- Click on the adjacent NetMask box and enter 24 (it might automatically enter it for you)
- Enter in the Gateway: 192.168.56.1 (the vboxnet0 IP)
- Click in the blank area of the DNS Servers and also enter 192.168.56.1
- Click Save (authenticate with your password)
- Click Close to leave.
Fix the routing (if necessary)
When you boot up and come back in check if the routing is working by:$ ping 8.8.8.8If this doesn't work it means that the static IP just set has become the default route, which is not what you want. To be correct you should see:
$ route Destination Gateway ... default 10.0.2.2 ...Here's the fix. Create the file (as root):
/etc/network/if-up.d/gwconfig
#!/bin/sh if [ "$IFACE" = "enp0s8" ]; then route delete default gw 192.168.56.1 fiselect
$ sudo chmod +x /etc/network/if-up.d/gwconfig $ sudo reboot