Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

What is a virtual machine monitor?

hypervisor or virtual machine monitor (VMM) is computer software, firmware or hardware that creates and runs virtual machines. A computer on which a hypervisor runs one or more virtual machines is called a host machine, and each virtual machine is called a guest machine. The hypervisor presents the guest operating systems with a virtual operating platform and manages the execution of the guest operating systems

BibTeX Referencing
reference@misc{wikipedia_2019, title={VirtualBox}, url={https://en.wikipedia.org/wiki/VirtualBox}, journal={Wikipedia}, publisher={Wikimedia Foundation}, author={Wikipedia}, year={2019}, month={May}}
.

VirtualBox

The hypervisor we have chosen to work with is Oracle VM VirtualBox, which is a free and open-source hosted hypervisor for x86 virtualization, developed by Oracle Corporation

BibTeX Referencing
reference@misc{Wikipedia_2019, title={Hypervisor}, url={https://en.wikipedia.org/wiki/Hypervisor}, journal={Wikipedia}, publisher={Wikimedia Foundation}, author={Wikipedia}, year={2019}, month={Apr}}
.


Panel
borderColor#dfe1e5
bgColor#eff9ff
borderWidth2
titlePage content

Table of Contents



Creating a new virtual machine (VM)

  1. Visit Virtualbox's webpage for download and installation.
  2. Open Virtualbox and start creating a new virtual machine by clicking the "New" button.

  3. A new window will then open. You may here specify the name of your new virtual machine, what type of OS you would like to install and the location. In this guide we will install the Linux distribution Ubuntu.

  4. The next step is to set the memory size allocated to the virtual machine. Exatly how much RAM to allocate depends on the tasks you're using it to perform. The more memory you allocate, the smoother and more powerful it will be. However, a good rule of thumb recommendation is to not exceed 50% of your total memory.

    Info

    The memory allocated will only be utilized when the VM is beeing run. You can also easily change the assigned amount of RAM to your VM at any time later.


  5. Select the virtual hard drive for the new machine to use. If this is the first VM created with VirtualBox, the creation of a new virtual hard drive is needed. The hard disk type really only matters if you're planning to use the same virtual hard disk with another virtualization provider. We will therefore leave it at the recommend VDI. More information about which types are supported by other virtual disk softwares is found here

  6. How the hard disk file should grow depends on preferences. Summarized is dynamically allocated a bit slower during writing operations, as it filles up as you write, while the fixed size is slower to set up, but does not spend resources allocating while writing. The disk size depends on how much data you are planning on storing inside your VM, but should at least exceed the recommended amount.
  7. Your window should now look something like this.

Installing the OS

We now need to install the chosen OS (in this case XUbuntu OS) onto our new virtual machine.

  1. Start by clicking the "Settings" button. A window like the one below will appear. Navigate then to the "Storage" section and mark the empty disk below "Controller: IDE".

  2. Click then on the disk icon under "Attributes" next to the CD/DVD Drive dropdown, choose "Choose Virtual Optical Disk Drive". 
  3. Navigate then to the .iso (Disc Image File/Plateavbildingsfil) with your OS, and choose it.

    Info

    In order to locate the correct file, you will first have to download it yourself. This is easily done by visiting the offical webpage of your chosen OS. For Windows, see NTNU Innsida's guide using Microsoft Azure Dev Tools for Teaching.



  4. Double-click on your new virtual machine and it will start up in a new window. The installation of your new OS will now begin as if it was beeing installed on a completely new device.

  5. When installing, you will be asked to "Erase disk and install Xubuntu (your OS)". This is no problem, as our virtual machine is brand new, and the .iso-file will be installed onto the clean virtual disk we created earlier.

  6. After installation, you will be asked to restart the computer. When restarting, we are told to remove the installation medium, reffering to the .iso-file that is still attached to our VM. VirtualBox will take care of this for us, so all we need to do is press enter.

  7. Your new virtual machine should then be ready to use.

Installing VirtualBox Guest Additions

Guest Additions are designed to be installed inside a virtual machine after the guest operating system has been installed. They consist of device drivers and system applications that optimize the guest operating system for better performance and usability

BibTeX Referencing
reference@misc{virtualbox, url={https://www.virtualbox.org/manual/ch04.html}, journal={Chapter 4. Guest Additions}, author={VirtualBox}}
. VirtualBox's manual on guest additions can be found here.

  1. Choose your virtual machine, and navigate to the "Storage" section and mark the empty disk below "Controller: IDE", just like in the first step of installing the OS. Click then on the disk icon under "Attributes" next to the CD/DVD Drive dropdown, choose "Choose Virtual Optical Disk Drive". 

  2. The Oracle VM VirtualBox Guest Additions for all supported guest operating systems are provided as a single CD-ROM image file which is called VBoxGuestAdditions.iso. This image file is located in the installation directory of Oracle VM VirtualBox. Click then "ok"

  3. Turn then on your VM by double-clicking on it. Open the disc VBox_GAs_6.0.8 and locate the correct guest additions for your OS (since I have XUbuntu installed, I need the Linux additions). Right-click and choose "Open Terminal Here".

    Info

    This installation was made on the Linux distribution XUbuntu. The last steps showing how to install guest additions may therefore deviate a bit for other OS's.



  4. Type "sudo sh VBoxLinuxAdditions.run" and follow the instructions. For our guest additions to go active, we first have to restart the system.


BibTeX Display Table