In this guide we show OpenNebula Cloud users how to import an Ubuntu | Debian Qcow2 OS images to OpenNebula image datastore and spinning virtual machines from them. OpenNebula is created to help System Administrators manage distributed data center infrastructures from a central console. In our recent guide, we covered importation of CentOS 8 and CentOS 7 qcow2 OS images. This is a critical step before the actual creation of Virtual Machines on OpenNebula Cloud environment.
You’ll need an access to OpenNebula Sunstone web console, with the permissions to write to image datastore. Before you perform this operation confirm the Image type datastore ready for use. In my setup, this datastore is named “default“.
Step 1: Locate & Import Debian | Ubuntu OS Images
You can optionally create your own custom Qcow2 images for any version of Ubuntu/Debian release. In our guide we’ll use the publicly available Cloud images from OpenNebula market place.
On the web console move to Storage > MarketPlaces > OpenNebula Public
Select “Apps” tab and search for “Ubuntu” to filter results.
Select the OS image you want to import to the image datastore. I’ll go with “Ubuntu 20.04“, and hit the Cloud import link.
Select the the storage datastore for the image then “Download” link.
For Debian filter with the keyword “debian“
Upon successful importation the templates are created.
Step 2: Edit Created Templates
To customize the templates go to “Templates” > “VMs” then select the template you want to update.
In the next screen click on “Update” button.
Update default compute information such as memory and CPU to your liking in the “General” tab.
Default network can be chosen under the “Networks” tab.
Upload default SSH key under “Context“
Modify any other settings as needed and click “Update” to commit the changes.
Step 3: Create Ubuntu | Debian Virtual Machines on OpenNebula
To create an Ubuntu / Debian Virtual Machine go to “Instances” > “VMs“. Choose OS “Template” and give VM a name, count and modify compute parameters.
Wait for the VM status to change from “PENDING to “RUNNING“
Initiate an SSH access to confirm the instance is up and running:
$ ssh [email protected] The authenticity of host '172.20.20.101 (172.20.20.101)' can't be established. ECDSA key fingerprint is SHA256:hUrIPpbWL51mKrzZ1PVkuPMVwlIlhS8WDTP8g7F+klI. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '172.20.20.101' (ECDSA) to the list of known hosts. Enter passphrase for key '/home/josphat/.ssh/id_rsa': Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 4.19.0-14-amd64 x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage System information as of Wed Mar 31 20:28:46 UTC 2021 System load: 0.08 Temperature: 41.0 C Usage of /: 50.5% of 1.96GB Processes: 22 Memory usage: 8% Users logged in: 0 Swap usage: 0% IPv4 address for eth0: 172.20.20.101 0 updates can be installed immediately. 0 of these updates are security updates. The list of available updates is more than a week old. To check for new updates run: sudo apt update Last login: Wed Mar 31 20:28:28 2021 from 172.20.20.1
We’ve successfully imported a Debian and Ubuntu OS images to OpenNebula Image datastore and created VMs from the templates created.