W4118

Setting up an Ubuntu Linux VM in VMware

You will be doing development and testing on a Linux system. To make this easy to do in an isolated environment running on your own personal computer, you will create a virtual machine (VM) in which you will install Linux. This guide provides instructions for installing Ubuntu Linux in a VMware VM. You will download and install VMware, download Ubuntu Linux, create a VM using VMware, then install Ubuntu Linux in your VM.

Download and Install VMware

Download and install the latest version of VMware’s desktop hypervisor. Once you’re in the Broadcom portal, go to the My Downloads tab. Then, you may need to click on the button in the top right corner beside your name, and select VMware Cloud Foundation.

Use:

Select the version labeled with for Personal Use.

Download Ubuntu Linux

There are many GNU+Linux distributions, but we will use Ubuntu. Ubuntu is a distribution derived from Debian. This class used to use Debian, but Ubuntu provides more recent kernel versions.

We will be using Ubuntu 24.04.1. All files mentioned below can be found here.

Always verify the checksums of your downloads. You can follow the instructions here. Try to understand what each of these steps does. You will need to use the checksum files SHA256SUMS and SHA256SUMS.gpg.

Create a VM

Create a new virtual machine in VMware using the Ubuntu ISO image you just downloaded. For example, on VMware Fusion, this can be done by selecting New from the File menu. Select the Install from disc or image option and choose the relevant ISO file.

For the OS for the VM, choose Ubuntu 64-bit ... if available. Depending on your platform, it may not be an option yet. In that case, choose Other Linux 6.x kernel 64-bit .... On some systems, you may need to click on Go Back after uploading your ISO file to set the OS.

For the boot firmware, choose Legacy BIOS. If you are using an M1/M2/M3 Mac, this option may not be available.

The default settings for memory and storage are probably too small. Customize your VM as detailed below. Note that on some platforms, you may need to press Finish and actually create the VM before you can edit these settings. Once the VM is created, click on Virtual Machine and then Settings.

Installing and Setting Up Ubuntu

After configuring the VM, start the VM. The VM will now boot from its CD-ROM drive containing the Ubuntu GNU/Linux install disk, which is virtually mapped to the ISO file that you downloaded.

Select Try or Install Ubuntu. You will then be guided through a somewhat lengthy installation process. Most of the default settings are acceptable – below is an outline for some of the choices you should be making:

Then, select Restart now. This might take awhile. It’s okay if you see a message on removing installation media. You can simply click Ok.

After your system restarts, you may also be prompted to configure the following additional settings:

Using your Ubuntu VM

Two tips you may find useful when using your VM are using SSH to connect to your VM and using Vim and cscope for development.

Shutting down your Ubuntu VM

Shutting down a VM using VMware e.g. using Virtual Machine -> Shut Down may not always work properly. See this link for more details. To ensure a graceful shutdown is performed, you should always shut down your VM from within the guest operating system itself. In Linux, you can do this by running sudo shutdown.