▷ How to install and create virtual machine in qemu from ubuntu
Table of contents:
- What is Qemu
- How to install Qemu in Ubuntu
- Create virtual machine in Qemu Ubuntu
- Virtual machine configuration in Qemu
- Boot options
- Hard drive options
- Network Configuration
- Rest of configuration
Today we are going to see how to install Qemu in Ubuntu and we are going to see the process to create a virtual machine in Qemu through its graphical interface. There are quite a few hypervisors on the market that provide us, among other solutions, with a graphical interface to be able to install our virtual machines in desktop mode. Not only should we focus on a Hypervisor like VirtualBox, there are also other very interesting options that will allow us to do this type of procedure under operating systems like Ubuntu.
Index of contents
Qemu, in addition to being able to work in command mode, also provides us with a graphical interface to be able to install our virtual machines in a graphical way, like the typical VirtualBox and Vmware hypervisors under Windows. And this is not an exception in Linux systems, with Ubuntu the terminal is less and less necessary to work with the system, although it will always be a very important part.
What is Qemu
Qemu is a processor emulator based on the conversion of binary code to higher level code so that it can be understood by the host machine. This was its first mission, although it was also endowed with virtualization capabilities thanks to its initial function, and it is precisely what it is used for today.
With this tool we will be able to virtualize machines under a guest operating system like GNU / Linux, Windows or Solaris, and an external version called Q for Mac OS X. One of the most important characteristics of this Hypervisor is that it is capable of running on practically any type of processor, be it 32 or 64 bits or PowePC, MIPS, SPARC and practically all existing architectures. This is precisely because of its original design to emulate processors.
Qemu is not initially a tool with a graphical interface or GUI, so the first thing we can assume is that all the functionalities must be managed from the command window. But thanks to the implementation of Qemu manager for Windows and Qemu Launcher for Linux, it is possible to install an extension to this program to provide it with a graphical interface.
Qemu Features:
- It is capable of virtualizing Linux, Windows, DOS, Solaris, BSD, MacOS and other systems and includes compatibility for x86, AMD64, Mips, Alpha and Sparc platforms. It allows emulating network and peripheral environments and any virtual machine Remote control for virtual machines Possibility to create dynamic disks so that it only occupies the space used for the installation of the virtual machine We will be able to store the state of a virtual machine and return to it after a crash of the host system Capacity for complete management from the command window
To know everything about Qemu, it is best to see its complete user guide with information about all the features of the Hypervisor
How to install Qemu in Ubuntu
Before creating a virtual machine in Qemu Ubuntu we will have to proceed to install the necessary program and tools. In addition to the Qemu application, we will need to install some additional packages in order to extend the functionality of Qemu. Such is the case of the installation of the graphical interface.
Then, we proceed to open a terminal by going to the applications button or directly by pressing the key combination " Ctrl + Alt + T ".
Now we are going to write the following command and the packages that we are going to install together with Qemu, obtained directly from the repositories:
sudo apt-get install qemu-kvm qemu virt-manager virt-viewer libvirt-bin
We wait for the process to finish and we may be able to open Qemu directly from our graphical environment. To do this we must go to the applications menu and locate the " Virtual Machine Manager " icon
If after installation we try to open the virtual manager and an error occurs, what we will have to do is restart the machine
Create virtual machine in Qemu Ubuntu
Well, once the Qemu graphical interface is open, the procedure is quite similar to any other Hypervisor. Let's proceed then.
We must click on the monitor icon in the upper left corner to open the virtual machine creation wizard.
In the first step we must choose the way in which we will install the operating system. We will choose the first one, corresponding to the ISO image, since we have a Windows 10 to do the process
If we extend the architecture options, we can choose whether the machine will be 32 or 64 bits
In the next window, we must choose, according to our case, the image for the system installation.
Next, we deactivate the lower option to select the operating system that we are going to install. We have absolutely all the Windows distributions available in the menu, as well as other operating systems.
In the next window we will have to enter the amount of RAM and the number of CPUs that we want to assign to the virtual machine. This will depend on the number of cores that our team has.
Next, we must select the amount of storage for the virtual disk of the system. By default virtual disks will be stored in the path “ / var / lib / libvirt / images ”
Next, we will have to put the name of the virtual machine and select the network mode. For now we will leave this in NAT mode. With this we will finish the process of creating the virtual machine.
Virtual machine configuration in Qemu
Then a window will open with the different configuration options, which as we can see is quite similar to the VirtualBox. This is where we can modify certain aspects of the machine in detail, although the intervention of the command terminal will still be necessary for certain functions. Here we will see some recommended configurations before proceeding to install the virtual machine:
Boot options
From this option we can configure the starting mode and devices of the virtual machine. We recommend activating the “ Enable boot menu ” option to be able to choose between Hard Drive or CD (ISO) whenever you want.
Hard drive options
By default the configuration is set as an IDE disk. If we click on the list of disk Bus we can select for example SATA to obtain greater performance in virtualization
Network Configuration
From this panel we can select the type of network to which our virtual machine will connect. By default it is configured in NAT mode, and to be able to do it in bridge mode and obtain IP from the router directly, we will need to perform a series of configuration steps in command mode that will take up a complete tutorial.
For this, we will make a tutorial to configure a bridge or bridge type network in KVM / Qemu shortly.
Rest of configuration
The rest of the configuration is not excessively important except that we want to do very specific things with our virtual machine.
If we want to install new hardware in our virtual machine we will have to click on " Add Hardware ". We can install connection ports, expansion cards, TPM devices, etc. We will add the one we deem appropriate to proceed with its use from the virtual machine.
After completing the configuration, the installation process of the operating system will be exactly the same as that of a real machine, so it is not worth going into such details.
This is the procedure to install the Hypervisor and create a virtual machine in Qemu Ubuntu.
You may also be interested in this information:
Have you ever used Qemu? Tell us what you think about this virtualization tool
Asus and strongbox create the most powerful rendering machine in octane
Strongbox has teamed up with Asus to create the world's most powerful rendering system on Octane thanks to the use of a total of 8 GPUs.
▷ How to create virtual machine in virtualbox and configure it
We show you how to create a virtual machine in VirtualBox. ✅ We will configure hard drives, network, shared folders, we will import VDI disk, VMDK
▷ How to create virtual machine in hyper
If you want to test virtualization in Windows, you will see here how to create virtual machine in Hyper-V ✨ and configure it step by step