How to use nested virtualization on Creodias CF2 cloud

../_images/button_orange_cf2.png

Nested virtualization allows you to create virtual machines “inside” your virtual machines. All virtual machines on the CF2 cloud should support this feature. In this article, we are going to cover testing whether this feature works and troubleshooting it.

What We Are Going To Cover

  • Testing nested virtualization

  • Troubleshooting nested virtualization

  • Guidelines for installing and using the virtualization software

Prerequisites

No. 1 Account

You need a CREODIAS hosting account with access to the Horizon interface: https://cf2.cloudferro.com/auth/login/?next=/

No 2. Basic knowledge about virtualization

Basic knowledge about virtualization is required.

No. 3 Virtual machine

You need a virtual machine on CF2 cloud. For example, you can follow this article to create it: How to create new Linux VM in OpenStack Dashboard Horizon on CREODIAS.

Step 1 Test and/or troubleshoot whether nested virtualization is installed

Testing nested virtualization

Here are two ways of testing whether nested virtualization is operational, one for Linux and one for Windows.

Check whether virtualization is enabled on Ubuntu VM

On Ubuntu, we check CPU flags to see whether the virtualization is enabled or not.

Execute the following command:

lscpu | grep 'vmx\|svm'

You should get output containing the list of CPU flags. If these flags include either vmx or svm, the virtualization is enabled on that Ubuntu instance. For instance, in the screenshot below, the flag vmx, denoted in red, is present.

../_images/use-nested-virtualization-04_creodias.png

Check whether virtualization is enabled on Windows VM

Open command prompt and execute the following command:

wmic cpu get VirtualizationFirmwareEnabled

If the output contains at least one word TRUE (like on the screenshot below), that means that virtualization is enabled on that particular machine and you should be able to create virtual machines on it.

../_images/use-nested-virtualization-05_creodias.png

Troubleshooting nested virtualization

If nested virtualization does not work for you (for example, the above tests did not yield positive results), you should shut down your virtual machine and turn it on again. Please note that a reboot might be insufficient for this purpose.

If this didn’t help, please do not hesitate to contact our support team: Helpdesk and Support.

Step 2 Guidelines for installing and using the virtualization software

If you have chosen a large enough flavor of the VM, you should have sufficient resources to install one or more virtual machines inside your VM. Virtualization software is available for both Ubuntu and Windows. Examples of such software, among others, include VirtualBox, KVM Hypervisor and VMWare. It is up to you to

  • check the compatibility of the virtualization software with the CF2 VM you are using,

  • obtain valid license and

  • follow the installation procedures.

Possible use cases for virtual machines inside a CF2 VM could be:

– setting up a uniform working environment for your students or employees,

– downloading EODATA to the main VM and then accessing it from virtual boxes, each user with its own environment, login details and so on, or

– experimenting with operating systems other than those offered as images under CF2.