Notes from the VirtualBox – Part 2

Setting up Ubuntu 18 in VBox

Now that we have created a “placeholder” for Ubuntu in the VBox Manager, we can get started installing Ubuntu 18 Desktop. We won’t go step by step thru the installation process because there are many guides available that will walk users thru a new Ubuntu installation.

Instead, we’ll focus on a couple of sticking points that I ran into (and lost many hours trying to resolve them).

BEFORE starting your new VBox Ubuntu instance, set it up as follows:

  • Configure the amount of RAM this instance will use
  • Configure the number of CPU’s it will use
  • Configure the number of network adapters it will use

Display Details in VBox Manager

Show the details about the currently selected VM in the main panel by:

  • Clicking on the Details box in the center of the Welcome screen 
  • Clicking on the Machine Tools dropdown arrow and then selecting Details

The VBox Manager will change to info about each of its major subsystems (shown below):

Configure the Amount of RAM

The System info box shows that this instance of Ubuntu has been configured with 2 GB of Base Memory. Since I have 12 GB installed on my system, I can afford to allocate 4 GB total to this instance. And experience has shown that it will perform a little better and will be less likely to use the swap disk.

To change memory, click on the word “System” in the System info box to display the System tab of the Settings dialog box (shown below).

Drag the control to the right to increase Base Memory to the desired size or left to decrease Base Memory. Click OK button when the desired size has been selected.

Configure the Number of CPU’s (Processors)

The Create New Virtual Machine scripts defaults to one CPU, no exceptions. If your computer has more than one CPU or CPU Core, it will benefit from increasing the number of CPU’s allocated to your VM. My computer runs an Intel i7 processor with 4 cores (or 8 hyperthreads); experience has shown that allocating up to half of these hyperthreads to the VM works fine.

To change the number of CPU’s,  click on the word “System” in the System info box to display the System tab of the Settings dialog box (shown below).

Drag the control to the right to increase the number of CPU’s allocated to this VM. Click the OK button when the desired number has been selected. NOTE that this step could also been performed when changing Base Memory setting previously.

Configure Number of Network Ports

The default setup has one virtual network adapter configured that will reach the internet using NAT (Network Address Translation). If you just want to run a browser then you can skip the rest of this step. However, if you think you might want to run a web server inside your VBox, you will need to set up a second virtual network adapter.

Many VBox instructions available on the internet apply to earlier configurations. In VBox 5.2.19 and later, do the following:

  • Click on the File Menu and then select Preferences. In the dialog box, click on the Network option. If a NatNetwork option is NOT active, click the green plus-sign icon to add and activate it and then click the OK button.
  • Click on the word Network in the Network info box to display the Network tab in the Settings dialog box.
  • Click on the Adapter 2 tab and tick the Enable Network Adapter checkbox.
  • Click on the Attached to: dropdown selector and chose the Host-only Adapter option.  This allows any OS on your computer to “see” this adapter. 
  • When the Network settings look like the following image, click the OK button.

Making these changes before installing Ubuntu improves the quality of the installation, especially when installing the Ubuntu 18 server. The desktop version is friendlier and does a few more things for you but the server version puts all options under your control and won’t do anything unless you specifically instruct it to do something (with great power goes great responsibility). 

Installing Ubuntu

After all of the above, we are ready to install Ubuntu.

  • Click the Start icon (green arrow pointing right). The first time you start your VM, it will detect that it doesn’t have a bootable OS installed on its virtual hard disk so it begins the installation process.
  • In the “Select start-up disk” dialog box, change the Host Drive (virtual hard disk defined earlier, on left) by clicking on the folder icon and then navigating to your Ubuntu download and selecting it, as shown on the right.

Click the Start button and the standard Ubuntu installation process will begin. And like any standard Ubuntu installation, there will be a test of your faith, when it asks if you want to erase the hard drive and lose all your data. It is referring to the virtual hard disk and not your real physical hard disk. 

When done, it will display “Installation is complete. You need to restart the computer in order to use the new installation.” Click the Restart Now button. 

A message will display, “Please remove the installation medium, and then press ENTER”. Since there is no medium to remove, just press ENTER.

Your vbox will grind away for a while and then the familiar user log in screen will display. 

Part 3 of this series will discuss installing the Linux server and some of the problems that may be encountered installing and configuring the server.

One thought on “Notes from the VirtualBox – Part 2

  1. Pingback: Notes from the VirtualBox – Part 4 | Avian Computing

Leave a Reply

Your email address will not be published. Required fields are marked *