Body
Prerequisites: You must have administrator access to the computer on which you want to create the virtual machine.
1. Download the VirtualBox application.
Use your favorite web browser to go to https://www.virtualbox.org.
Click on the Download link in the column at the left side of the page.
Select the Windows hosts link.
Follow your chosen web browser's download process to download the installation file to your Downloads folder.
Scroll down the page a bit and click on the All supported platforms link under the VirtualBox 6.1.6 Oracle VM VirtualBox Extension Pack section.
Follow your chosen web browser's download process to download the installation file to your Downloads folder.
Open up the Windows File Explorer and navigate to your Downloads folder.
Find the two files that you just downloaded and select both of them, then right-click your mouse on either of them.
Select Scan with Windows Defender from the context menu.
Windows Defender should return a result of No threats found.
If you receive a result that indicates a threat was found, stop here and report the infection.
Assuming no threats are found, close the Windows Defender interface.
2. Install VirtualBox.
Return to your File Explorer window and double-click on the VirtualBox installer file. Click the Next button.
Allow the default settings and click on the Next button.
Other than the Register File Associations option, you may choose to enable or disable the other options as desirable.
Click Next.
You may or may not get a warning message about being temporarily disconnected from the network. Click Yes unless you have some process running that will be adversely affected by a short network outage.
Click Install.
You are prompted to enter the administrator credentials. Please refer to How to properly use an administrator account on a Microsoft Windows computer if you have any question about how to enter your administrator credentials.
Click the Yes button.
Installation now proceeds and display the progress dialog.
Since VirtualBox "virtualizes" some of the host computer's hardware, drivers are installed. You are prompted to allow these drivers to be installed.
Select Always trust software from "Oracle Corporation". and Install.
If you have already obtained the Ubuntu installation file, you can leave the Start Oracle VM check box selected. If not, deselect it.
Click the Finish button.
3. Obtain Ubuntu installation file.
Use your preferred web browser to go to https://ubuntu.com/
Find the Download link near the top of the page and click on it.
A note about Ubuntu versions: Ubuntu maintains a six month release cycle for major operating system upgrades.
The Spring release is usually in the middle of April, which is the fourth month of the year and hence the version number has a .04 suffix. e.g. the 16.04 version of Ubuntu was released in April 2016 and the 20.04 version was released in April of 2020.
Every four years, the version released is a Long Term Support (LTS) version. This means that Ubuntu's developers will provide updates, bug fixes, and security fixes for the LTS version for 5 years beyond the release date. (CSM ITS supports only the LTS versions of Ubuntu). Even though an updated version of Ubuntu is released every April, since only the LTS versions are supported for 5 years, installing a non-LTS version is not recommended.
The Autumn release of Ubuntu comes in October of each year. The releases are 16.10, 17.10, 18.10, etc. The Autumn releases are never long term releases and often include code in them that is not fully robust. Therefore, it is not recommended that a .10 release of Ubuntu be installed unless it has some feature that is essential. (CSM ITS does not support the .10 releases of Ubuntu).
On the Downloads page, you will see the latest version of Ubuntu available. At the time this knowledge base article was written, ITS is supporting Ubuntu Desktop 18.04 only.
Support for 20.04 LTS will probably come during Fall 2020.
To find the 18.04 installation file, click on the older releases link.
Select Ubuntu 18.04 LTS (Bionic Beaver)
Select 64 bit (AMD64) desktop image.
Follow your chosen web browser's download process to save the install image file to your Downloads folder.
Once the download has completed, close the web browser. Refer to earlier in this article about scanning the downloaded installation file for threats.
4. Install VirtualBox Extension Pack.
NOTE: To use the Extension Pack, you need to ensure your use if for educational purposed per the VirtualBox_PUEL – Oracle VM VirtualBox licensing agreement.
Launch VirtualBox. If you chose the defaults at install time, there is an icon on your desktop and an entry on your Programs menu,
Select the VirtualBox Files menu then Preferences.
Select Extensions from the VirtualBox - Preferences dialog box, then click your mouse on the + symbol at the right-hand edge of the dialog box.
Browse to your downloads folder and select the Oracle_VM_VirtualBox_Extension_Pack-6.1.6.vbox-extpack file.
Click on the Open button.
Click Install.
Scroll to the bottom of the VirtualBox License dialog and click on the I Agree button.
When the extension pack install is completed, click OK on the Information dialog.
Then click OK on the VirtualBox Preferences dialog box.
5. Create the Virtual Machine.
From the Oracle VM VirtualBox Manager dialog, click on the New icon.
Give your virtual machine an appropriate name.. You can use the default machine folder or change it if desired.
Be sure that the Type: and Version: entries are appropriate for your version of Ubuntu, then click Next.
Next, select the amount of RAM memory that you want to allocate to your virtual machine. There are a few factors to consider.
First, the more RAM you allocate to the virtual machine, the less RAM there is for the host computer to use.
Second, your intended use of the virtual machine also has an impact. If you'll be doing RAM intensive calculations in the virtual machine, you'll want to allocate more RAM than if you're doing less intensive operations. Regardless of your choice now, the amount of RAM allocated can be changed later.
In our example, since my test system only has 4GB of RAM, I will allocate half of it for the virtual machine.
Click Next once you have made your choice.
Now we create the virtual hard disk on which the operating system will be installed.
Select Create a virtual hard disk now, then click the Create button.
Leave the default disk type as VDI (VirtualBox Disk Image) and click Next.
Select Dynamically Allocated for the virtual disk type. This will allow it to dynamically grow when necessary. Click Next.
Select 2.00 TB as the maximum size of the virtual disk. This will allow the virtual disk to grow to that maximum size.
It will not initially take up that amount of physical space on your physical hard drive. A default Ubuntu installation results in a .VDI disk file that is about 8GB in size.
Don't worry if your physical disk is smaller than 2 TB.
Leave the default file location as is and click on the Create button.
Your virtual machine is now created. At this stage, it is a blank container. There are a few more tweaks to make before it is ready to receive the operating system
Pictured below is the Oracle VM Virtual Machine Manager dialog in its maximized state. You can see many of the default and user selected settings visible on the main page.
Click on the Settings icon.
In the General section, select the Advanced tab and enable Bidirectional for both Shared Clipboard and Drag n'Drop.
This will facilitate dragging and dropping files to and from the virtual machine and host computer and sharing of the clip board contents of the virtual machine and the host computer.
In the System section, select the Motherboard tab and deselect the Floppy to remove it from the Boot Order:
In the Display section, select the Screen tab and increase the default amount of Video Memory to suit your purposes with the virtual machine.
The more video memory allocated from the physical video device, the better the video will perform in the virtual machine.
The maximum amount available varies depending upon the physical video device installed on the host computer.
This setting can be modified later.
We are now done with the changes. Click the OK button.
6. Launch the Virtual Machine and Install Ubuntu.
We are now ready to boot the virtual machine and install Ubuntu Linux on it. From the Oracle VM VirtualBox Manager dialog, select your virtual machine and then click on the Start icon.
Since your virtual machine does not yet have an operating system installed, you have to tell it what to boot from. We are going to point it to the Ubuntu 18.04 install file that we downloaded earlier. That install file is a virtual DVD ROM image which is bootable.
Also notice the message at the top of the screen which states You have the Auto capture keyboard option turned on. This will cause the Virtual Machine to automatically capture. What this is telling you is that as long as your host computer's mouse cursor is inside the window defined by the virtual machine, that anything you type at the keyboard, or anything you do with your mouse will take effect inside the virtual machine. Conversely, when you mouse cursor is outside the confines of the virtual machine window, the keyboard and mouse actions are sent to the host computer, not the virtual machine. You can click on the X symbol to dismiss the message once, or click on the caption balloon image to the right of the X to never show this message again.
Click on the browse icon to the right of the drop-down list which has Host Drive D: on it and then click the Add icon.
Navigate to your Downloads folder and select the Ubuntu install file you downloaded earlier, then click the Open button.
After a few seconds you'll see the Ubuntu install file appear in the Optical Disk Selector dialog box. Highlight the Ubuntu install file and click the Choose button.
The Ubuntu install file is now selected as the start-up disk. Click the Start button.
Your virtual machine now boots from the Ubuntu install file and the installation process proceeds just as it would if you were installing Ubuntu on a physical computer.
At this point, the process of installing Ubuntu is exactly the same as if it were being installed on a physical computer.
For the purposes of this tutorial, I am not going to go through the Ubuntu install process. Please refer to the knowledge base article How to install the Ubuntu 18.04 for the complete install process, then return to this tutorial to complete the virtual machine process.
7. Log on to the virtual machine for the first time.
We pick up the tutorial again after the Ubuntu install is completed and is booted for the fist time.
In the example below, I chose the user name SysAdmin during the install. You will log on to your virtual machine using the account name you created during the install process.
Enter your credentials and click Sign In.
You are presented with a series of introductory slides. Click Next on each and then Done on the final slide.
After the last slide, you are returned to the Ubuntu desktop.
Your Ubuntu 18.04 virtual machine is now fully configured and ready for use.
You can shut down the virtual machine from within Ubuntu just as you would at a physical computer.
You can also freeze the state of the virtual machine and close it. You can re-open the frozen virtual machine at a later date and pick up where you left off.
To freeze the virtual machine, click on the File menu, then select Close.
Select Save the machine state.
When you next start the virtual machine, it will come back up at the place you left it.
2020.05.14 dkearney
2022.03.22 - Revised - dkearney