Virt Install Tool For Virtualization With KVM and Qemu For Linux

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/virt-install-tool-for-virtualization-with-kvm-and-qemu-for-linux/
PINTEREST
PINTEREST
INSTAGRAM

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.

Installation

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

Ubuntu, Debian, Mint, Kali:

Fedora, CentOS, RedHat:

Help

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

Help

Help

Syntax

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.

http://www.poftut.com/linux-qemu-img-command-tutorial-examples-create-change-shrink-disk-images/

Specify Ram

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

LEARN MORE  How To Install Gns3 To Fedora?

In this example we set ram as 500MB

Specify Graphics

There are different graphic options. Here are those

  • VNC
  • Spice
  • Console

VNC

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

Spice

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

Console

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

Disable

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  Libvirt Tutorial

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

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/virt-install-tool-for-virtualization-with-kvm-and-qemu-for-linux/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)