Virt Install Tool For Virtualization With KVM and Qemu For Linux – POFTUT

Virt Install Tool For Virtualization With KVM and Qemu For Linux

Virtualization and cloud computing is future of the IT. There are a lot of tools and architectures to make virtual the systems. Every big vendor have their original or clone virtualization technology or ecosystem. Linux provides KVM, Qemu for opensource, fast virtualization. Open source cloud ecosystem Openstack is mainly positioned on KVM,Libvirt and Qemu. In this tutorial we will look how to use virt-install tool to create new virtual machines.


virt-install is a tool provided by tools set. We will install it like below.

Ubuntu, Debian, Mint, Kali:

Fedora, CentOS, RedHat:


Virt-install supports a lot of different option. These options can be listed like below.




We will use following syntax for virt-install command.

Specify Name

Every guest instance have a name to specify themselves. We can set the name of the guest instance with the -n or --name options. In the example we set vm name as test1 .

In order to run virt-install there are 3 mandatory options name , ram and disk image

Specify Disk File

Disk image is specified with --disk parameter. Disk image can be different types like qcow2 , vmdk , vdi etc.

LEARN MORE  How To Install and Setup VNC Server On Linux?

Specify Ram

Ram can be specified with --ram option. Provided value will accepted as MB .

In this example we set ram as 500MB

Specify Graphics

There are different graphic options. Here are those

  • VNC
  • Spice
  • Console


GUI connection to the vm can be setup with VNC protocol. We can specify VNC like below --graphics vnc option.


Spice is a new protocol developed for virtuliazation. It is faster and better than VNC. Spice can be enabled with --graphics spice option.


We can connect guests serial console to the our host console. This is useful if operating system has no GUI. We will use --console pty,target_type=serial --graphics none


We can disable the graphics completely with --graphics none option.

Specify CPU

CPU type and feature set can be specified with--cpu option. In order to use host system CPU features use --cpu host . Or we can use coredue CPU with --cpu coredue option.

LEARN MORE  What Is BIOS (Basic Input/Output System) and How To Access and Use?

Specify Network Interface

Another usefull feature is using host operating system networks to connect guest operating system. We will use -network option to specify related network resource. In this example we set host operating system bridge named virbr0 as network switch.

Specify Operating System Type

Linux KVM and qemu supports a lot of operating systems like BSD, Windows, Solaris etc. If we specify the operating system family and type qemu will arrange default options related with guest operating system. Some of the options offered by qemu are;

  • Windows
    • Windows XP
    • Windows 7
    • Windows Server 2008
    • Windows Server 2012
    • Windows Server 2016
  • Linux
    • Ubuntu
    • Debian
    • RedHat
    • Fedora
  • Unix
    • FreeBSD

In the example we will specify Debian 8 as operating system type for qemu with --os-type and --os-variant options.

Disable GUI Console

We can disable related console if we do not need any GUI or the guest system do not provide any GUI. We will use --graphics none

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)