Table of Contents
Virtual Machines (or VMs) are often used to provide isolated operating environments concurrently on a single system. Virtual machines are useful in the following context:
- Experimenting with different Operating system when you don’t have extra hardware.
- Testing softwares functionalties with different OS.
- Easy to replicate because of snapshoting of the VM.
- Building blocks for the Cloud computing (Iaas).
Pre-installation
In this phase, we will install the virtual machine manager (GUI to install VMs in Ubuntu) also we will download OS.
Install Virtual Machine Manager
Virtual machine manager is also called virt-manager. It is used to monitor the virtual machines in Linux. It allows the user to the following things:
- create, edit, start and stop VMs
- access VM’s console
- performance and resource utilization statistics graphs for each VM
Use the following command to install the virt-manager in Ubuntu
foofunc@ubuntu:~$ sudo apt update foofunc@ubuntu:~$ sudo apt install virt-manager
Download OS
You can install one of your favorite operating systems in VM. Therefore, we need a .iso image of that operating system. In this tutorial, I am creating ubuntu 21.04 VM. So, I will download ubuntu 21.04 OS from here.
Create VM
In this tutorial, we will be using virt-manager to install the VM. The following steps will show you how to create the VM.
Step 1: Open virt-manager
Step 2: Click on the virtual machine manager window mentioned in below snapshot.
Step 3a: Chose the is .iso file of the operating system
Step 3b: Click on the forward to install VM with chosen OS
Step 4: Chose memory and CPU settings and click forward.
Step 5: Create disk images for the VM, enter the size of disk image you want and click forward.
Step 6: change Vm name and click on finish
Verify: Following snapshot shows that if all the earlier steps has no issues you will see this screen. For next steps of the installation use How to install Ubuntu 21.04 (Hirsute Hippo) guide.
Summary
In the article, we learned why VMs are important and how we can install VM in ubuntu with the help of a virtual machine manager.
Thank you