Creating and Running a New Virtual Machine
Having installed VMware Workstation Player, we can proceed to create a new virtual machine.
However, before we create the virtual machine, we will need to have our Ubuntu operating system image stored somewhere on the computer. This tutorial targets ROS Kinetic which is well-tested on Ubuntu 16.04, so we’re going to install Ubuntu 16.04 into the virtual machine. To do this, download the image (.iso file) from:
Here’s a screenshot of that page:
[Hint: A google search of “ubuntu iso 16.04” can get you there.]
You will need to select the appropriate image for your computer. If you have a 64-bit machine, be sure to select the “64-bit PC (AMD64) desktop image”. If you’re not sure whether your machine is 32-bit or 64-bit, hit the right mouse button on the Windows “Start” button, select “System” and scroll down to the “System type” (example for Windows 10).
We’re going to select the 64-bit image.
Select “Save File” and hit “OK”. It will take a little while to download, as it is quite a large file. It has the whole Ubuntu Linux operating system in it!
When it’s done downloading, just make sure you know where the image is being stored on your computer. For example, in the Firefox browser you can select the download arrow (top right corner), hover over the .iso file, then hit the right mouse button and select “Open Containing Folder”.
Starting in the VMware Workstation Player app:
In the VMware Workstation Player app, hit the “Create a New Virtual Machine” selection. Then select the radio button “Installer disk image file (iso)”. Browse to the location where you downloaded the Ubuntu image (.iso file).
Fill in your details for your Linux operating system. Provide your Full name, a new User name and a password (just choose these, according to what you want). Then hit “Next”.
Name your virtual machine (or accept the one offered), and hit “Next”.
As it says in the dialog box, the virtual machine’s hard disk is stored as one or more files on the host computer’s physical disk. ROS along with other items can end up needing quite a lot of space, so I prefer to specify a disk capacity of at least 30 GB. So change the “Maximum disk size (GB)” to 30 and hit “Next”.
We’re going to be using a fair amount of the computer’s resources running ROS in Ubuntu, so we want to customize our use of the hardware resources. So hit the “Customize Hardware…” button.
Here we are going to grab more resources for Ubuntu. They will be “borrowed” whilst the virtual machine is running, and returned back when it is stopped (or paused). Giving more resources is good, but you may want to hold some back so that other Windows apps don’t suffer when the virtual machine is running. For example, you could set:
- Memory: 4GB
- Processors: 3
- Network Adapter: Bridged
The above would represent a good choice for a system with at least 8GB installed and 4 processors. Don’t worry too much about these settings, as they can be changed later. If in doubt, you could safely accept the defaults and review the settings later.
[Hint: you could find out about your computer by hitting the right mouse button on the Windows “Start”, and then selecting “System”. The number of available processors can be found in Windows “Device Manager”]
For the “Network” part, we want Ubuntu to be able to interact with the desktop and the wider network, including the internet. I like to run with a “Bridged” network connection as it allows me to assign a static IP to the Ubuntu virtual machine and have it be visible as a separate device on the network. Again, don’t worry if all this seems tricky. Worst-case, just accept the default (NAT), and come back to it later. For the example, we’re going with “Bridged”. So select “Network Adapter”, then hit the “Bridged” radio button.
Hit the “Configure Adapters” button.
We’re only going to bridge the WiFi adapter, so deselect every other adapter by unchecking the boxes, and hit “OK”, then hit “Close”.
Hit “Finish”. You’re done setting up Ubuntu under VMware!
If you see the following on your screen, do not worry. There is nothing wrong, we just need to do a bit of extra configuration…
Just follow the steps outlined here:
Or do a google search for “intel vt-x is disabled” and find some instructions. Modifying the BIOS is easier than it sounds!
Running your Virtual Machine
The first time you start your virtual machine, you will be presented with a dialog box:
Hit “Download and Install”. Software updates will be installed and then your virtual machine will be running!
[Hint: Let Ubuntu run it’s updates, and be aware this may take some time]
When you see the login prompt, your Ubuntu install is running. Congratulations!
Now go ahead and login using the credentials you specified during the installation.
The first time you login, Ubuntu will likely present you with a dialog box asking you if you want to upgrade. Which is nice, but we don’t want this.
Hit “Don’t Upgrade”. Then hit “OK”. You should now see your Ubuntu desktop running in the VMware virtual machine. The reason we don’t want to upgrade is because our ROS version (Kinetic) demands that we use 16.04.
Next we’ll tackle installing ROS into the virtual machine…