Virtual Machine Configuration
Table of Contents
Virtualization Setup
To prepare for the virtualization labs, you will need to install a virtual machine manager onto your computer.
Enable Virtualization Extensions
In order for your computer to properly run guest operating systems with reasonable performance, some hardware features of your CPU need to be enabled. For Intel processors, these features are called "VT-X", and for AMD processors, they are called AMD-V. It's hit or miss whether these features are enabled by default on consumer computers - in prior classes about 25% of students had to enable them manually.
If you have a Mac: Congratulations, any modern Intel-based Mac should already have VT-x enabled. If you wish to verify this out of an abundance of caution, launch the Terminal app and run the following command, and look for VMX in the output:
$ sysctl -a | grep machdep.cpu.features
If you have a Windows 10 PC: Run the Task Manager program. In the Performance tab, look for a line labeled "Virtualization", and confirm that it says enabled. Look here for an example of the desired output along with some alternate methods of confirming CPU virtualization extensions are enabled.
If virtualization extensions are not enabled, you will need to enable them before continuing. The location of the specific button is not in Windows, however. It's buried deep in the BIOS or UEFI software that runs immediately after your computer is powered on, before Windows even starts. The step-by-step process to enable this option is unfortunately very computer dependent. Typically the process involves restarting your computer and immediately starting to repeatedly press the F2 key. Or F10. Or DEL. The correct key varies by vendor. You might see a quick message "Press <some key> to enter Setup" flash very briefly on the screen. Or, you might need to do a search for "Access BIOS" followed by your specific computer make and model. Once you are in the BIOS, you can navigate using the arrow keys (or newer UEFI systems allow you to use the mouse). Navigate through the settings looking for a "Virtualization Extensions" (or similar) option that you can change from Disabled to Enabled. If you can't find anything, you might need to search for instructions for your specific model of computer. Save the BIOS settings (via the keyboard shortcut listed at the bottom of the screen), let the computer reboot, and then check if Windows says that Virtualization is enabled now.
Choose a Virtual Machine Manager
First, download the appropriate software for your computer. You have a few choices here:
- Paid products - RECOMMENDED CHOICE
- Windows or Linux: VMWare Workstation Pro
- As of August 2020, the latest version is 15.x and Pacific has a FREE ACADEMIC LICENSE
- Mac: VMWare Fusion
- As of August 2020, the latest version is 11.x and Pacific has a FREE ACADEMIC LICENSE
- Windows or Linux: VMWare Workstation Pro
-
Free products
- Windows, Mac, or Linux: VirtualBox
Warning: The free VMWare Workstation Player (for Windows) is NOT sufficient for this class due to the annoying limitation that it will only run a single virtual machine at a time, but we need multiple VMs running simultaneously and communicating with each other. Paid VMware products (Workstation Pro, Fusion) do not have this limitation.
Second, install it! (Accepting the default options is generally reasonable)
Third, run its own internal "Check for Updates" feature to ensure you have all the latest bugfixes and security fixes!
Virualization Setup FAQs
Which is better - VMWare or VirtualBox?
In previous classes, the VMWare products typically work more smoothly out of the box. But, the free VirtualBox product can always be setup correctly, it just might take some additional effort and additional searching for the correct process.
I have an older software version than what is listed above - can I use it?
Using an older virtual machine manger is highly discouraged. These are complex programs that are regularly updated to (a) improve compatibility with their host operating systems, (b) improve compatibility with the guest/virtual operating systems being created, and (c) fix security vulnerabilities that would allow a malicious guest OS to break out into the host OS. These should all be important to you as computer professionals, particularly the point about vulnerabilities! Update your virtual machine manager regularly, even if it means giving VMWare more money...
Virtual Machines for COMP 177
There are several virtual machines needed to complete the labs in this course:
- Ubuntu Linux - A good general-purpose Linux distribution
Ubuntu Linux
Download and configure a Ubuntu Linux virtual machine used for course homework and projects. The first download choice ("Ubuntu Desktop 20.04 LTS") is fine.
Use the following virtual machine configuration. You want enough disk/RAM/CPU for Ubuntu to be usuable, but not too generous, because you might also be running other virtual machines at the same time on your computer.
- Disk space: 20GB
- RAM: 2GB
- CPU cores: 2
The "Easy-Install" option in VMware does a good job at getting you to a running system, or you can turn it off and step through the installer manually. If doing it manually, after starting Ubuntu, be sure you choose the "Install" option from Boot menu! Otherwise, if you choose the default Live CD option, you'll end up with a virtual machine that is reset back to the original settings each time you restart. Walk through the install process as-if you were installing Linux normally, except that you're installing it into your virtual machine instead.
When installation is complete, install whatever Ubuntu updates are available. You can use the GUI (which should pop up onscreen) or the following commands at the terminal:
user@ubuntu:~$ sudo apt-get update
user@ubuntu:~$ sudo apt-get upgrade
VirtualBox-specific setup instructions:
If you are using VirtualBox, you will have better integration with your host system if you run the following commands to install the host tools inside of Kali:
user@ubuntu:~$ sudo apt-get update
user@ubuntu:~$ sudo apt-get install -y virtualbox-guest-x11
user@ubuntu:~$ reboot
# Now you should be able to resize your window and copy&paste into Linux...
In addition, for VirtualBox, ensure that file Drag and Drop and Clipboard integration is enabled. Go to Settings for your specific VM, select General->Advanced, and ensure both "Shared Clipboard" and "Drag'n'Drop" are set to "Bidirectional" instead of their default setting of "Disabled".
VMWare-specific setup instructions:
If you are using VMWare and have integration issues (broken cross-VM copy & paste, broken screen resizing), try re-installing the virtaul machine tools:
user@ubuntu:~$ sudo apt-get update
user@ubuntu:~$ sudo apt-get install -y open-vm-tools-desktop fuse
user@ubuntu:~$ reboot
# Now you should be able to resize your window and copy&paste into Linux...