Recently I have come to know that redhat Linux KVM/QEMU supports multiple operating systems as virtual guest including windows OS.So i just want to give a try and tested on one of the desktop. Unfortunately KVM will not work in Vmware workstation hosted Redhat Linux.You need to directly install the Redhat Linux on hardware for KVM/Qemu to work. Here we will see how to install KVM packages on Redhat Linux 6.3.Here is the step by step guide to creating the virtual machine using KVM.
[root@Global-RH ~]# yum install kvm
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Resolving Dependencies
--> Running transaction check
--> Running transaction check
---> Package gpxe-roms-qemu.noarch 0:0.9.7-6.9.el6 will be installed
---> Package qemu-img.x86_64 2:0.12.1.2-2.295.el6 will be installed
---> Package seabios.x86_64 0:0.6.1.2-19.el6 will be installed
---> Package sgabios-bin.noarch 0:0-0.3.20110621svn.el6 will be installed
---> Package spice-server.x86_64 0:0.10.1-10.el6 will be installed
--> Processing Dependency: libcelt051.so.0()(64bit) for package: spice-server-0.
---> Package usbredir.x86_64 0:0.4.3-1.el6 will be installed
---> Package vgabios.noarch 0:0.6b-3.6.el6 will be installed
--> Running transaction check
---> Package celt051.x86_64 0:0.5.1.3-0.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================
Package Arch Version Repository Size
========================================================================
Installing:
qemu-kvm x86_64 2:0.12.1.2-2.295.el6 dvd 1.2 M
Installing for dependencies:
celt051 x86_64 0.5.1.3-0.el6 dvd 50 k
gpxe-roms-qemu noarch 0.9.7-6.9.el6 dvd 219 k
qemu-img x86_64 2:0.12.1.2-2.295.el6 dvd 415 k
seabios x86_64 0.6.1.2-19.el6 dvd 90 k
sgabios-bin noarch 0-0.3.20110621svn.el6 dvd 6.6 k
spice-server x86_64 0.10.1-10.el6 dvd 274 k
usbredir x86_64 0.4.3-1.el6 dvd 37 k
vgabios noarch 0.6b-3.6.el6 dvd 42 k
Transaction Summary
==============================================================================
Install 9 Package(s)
Total download size: 2.4 M
Installed size: 6.9 M
Is this ok [y/N]: y
Downloading Packages:
----------------------------------------------------------------------
Total 2.9 MB/s | 2.4 MB 00:00
Downloading Packages:
-----------------------------------------------------------------------
Total 41 MB/s | 2.4 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : usbredir-0.4.3-1.el6.x86_64 1/9
Installing : 2:qemu-img-0.12.1.2-2.295.el6.x86_64 2/9
Installing : celt051-0.5.1.3-0.el6.x86_64 3/9
Installing : spice-server-0.10.1-10.el6.x86_64 4/9
Installing : sgabios-bin-0-0.3.20110621svn.el6.noarch 5/9
Installing : vgabios-0.6b-3.6.el6.noarch 6/9
Installing : seabios-0.6.1.2-19.el6.x86_64 7/9
Installing : gpxe-roms-qemu-0.9.7-6.9.el6.noarch 8/9
Installing : 2:qemu-kvm-0.12.1.2-2.295.el6.x86_64 9/9
dvd/productid | 1.7 kB 00:00 ...
Installed products updated.
Verifying : gpxe-roms-qemu-0.9.7-6.9.el6.noarch 1/9
Verifying : seabios-0.6.1.2-19.el6.x86_64 2/9
Verifying : vgabios-0.6b-3.6.el6.noarch 3/9
Verifying : 2:qemu-kvm-0.12.1.2-2.295.el6.x86_64 4/9
Verifying : usbredir-0.4.3-1.el6.x86_64 5/9
Verifying : 2:qemu-img-0.12.1.2-2.295.el6.x86_64 6/9
Verifying : sgabios-bin-0-0.3.20110621svn.el6.noarch 7/9
Verifying : spice-server-0.10.1-10.el6.x86_64 8/9
Verifying : celt051-0.5.1.3-0.el6.x86_64 9/9
Installed:
qemu-kvm.x86_64 2:0.12.1.2-2.295.el6
Dependency Installed:
celt051.x86_64 0:0.5.1.3-0.el6 gpxe-roms-qemu.noarch 0:0.9.7-6.9.el6 qemu-img.x86_64 2:0.12.1.2-2.295.el6
seabios.x86_64 0:0.6.1.2-19.el6 sgabios-bin.noarch 0:0-0.3.20110621svn.el6 spice-server.x86_64 0:0.10.1-10.el6
usbredir.x86_64 0:0.4.3-1.el6 vgabios.noarch 0:0.6b-3.6.el6
Complete!
[root@Global-RH yum.repos.d]#
[root@Global-RH ~]#
[root@Global-RH yum.repos.d]# yum install python-virtinst
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package python-virtinst.noarch 0:0.600.0-8.el6 will be installed
--> Processing Dependency: libvirt-python >= 0.2.0 for package: python-virtinst-0.600.0-8.el6.noarch
--> Running transaction check
---> Package libvirt-python.x86_64 0:0.9.10-21.el6 will be installed
--> Processing Dependency: libvirt-client = 0.9.10-21.el6 for package: libvirt-python-0.9.10-21.el6.x86_64
---> Package augeas-libs.x86_64 0:0.9.0-4.el6 will be installed
---> Package cyrus-sasl-md5.x86_64 0:2.1.23-13.el6 will be installed
---> Package gnutls-utils.x86_64 0:2.8.5-4.el6_2.2 will be installed
---> Package nc.x86_64 0:1.84-22.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
python-virtinst noarch 0.600.0-8.el6 dvd 490 k
Installing for dependencies:
augeas-libs x86_64 0.9.0-4.el6 dvd 317 k
cyrus-sasl-md5 x86_64 2.1.23-13.el6 dvd 47 k
gnutls-utils x86_64 2.8.5-4.el6_2.2 dvd 99 k
libvirt-client x86_64 0.9.10-21.el6 dvd 3.2 M
libvirt-python x86_64 0.9.10-21.el6 dvd 394 k
nc x86_64 1.84-22.el6 dvd 57 k
netcf-libs x86_64 0.1.9-2.el6 dvd 51 k
numactl x86_64 2.0.7-3.el6 dvd 59 k
yajl x86_64 1.0.7-3.el6 dvd 27 k
Transaction Summary
=============================================================================
Install 10 Package(s)
Total download size: 4.7 M
Installed size: 17 M
Is this ok [y/N]: y
Downloading Packages:
--------------------------------------------------------------------------------
Total 2.9 MB/s | 4.7 MB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : numactl-2.0.7-3.el6.x86_64 1/10
Installing : yajl-1.0.7-3.el6.x86_64 2/10
Installing : nc-1.84-22.el6.x86_64 3/10
Installing : augeas-libs-0.9.0-4.el6.x86_64 4/10
Installing : netcf-libs-0.1.9-2.el6.x86_64 5/10
Installing : cyrus-sasl-md5-2.1.23-13.el6.x86_64 6/10
Installing : gnutls-utils-2.8.5-4.el6_2.2.x86_64 7/10
Installing : libvirt-client-0.9.10-21.el6.x86_64 8/10
Installing : libvirt-python-0.9.10-21.el6.x86_64 9/10
Installing : python-virtinst-0.600.0-8.el6.noarch 10/10
Installed products updated.
Verifying : gnutls-utils-2.8.5-4.el6_2.2.x86_64 1/10
Verifying : cyrus-sasl-md5-2.1.23-13.el6.x86_64 2/10
Verifying : python-virtinst-0.600.0-8.el6.noarch 3/10
Verifying : augeas-libs-0.9.0-4.el6.x86_64 4/10
Verifying : yajl-1.0.7-3.el6.x86_64 5/10
Verifying : libvirt-client-0.9.10-21.el6.x86_64 6/10
Verifying : netcf-libs-0.1.9-2.el6.x86_64 7/10
Verifying : libvirt-python-0.9.10-21.el6.x86_64 8/10
Verifying : nc-1.84-22.el6.x86_64 9/10
Verifying : numactl-2.0.7-3.el6.x86_64 10/10
Installed:
python-virtinst.noarch 0:0.600.0-8.el6
Dependency Installed:
augeas-libs.x86_64 0:0.9.0-4.el6 cyrus-sasl-md5.x86_64 0:2.1.23-13.el6 gnutls-utils.x86_64 0:2.8.5-4.el6_2.2
libvirt-client.x86_64 0:0.9.10-21.el6 libvirt-python.x86_64 0:0.9.10-21.el6 nc.x86_64 0:1.84-22.el6
netcf-libs.x86_64 0:0.1.9-2.el6 numactl.x86_64 0:2.0.7-3.el6 yajl.x86_64 0:1.0.7-3.el6
Complete!
[root@Global-RH yum.repos.d]#
4.Install “libvirt” and “libvirt-python” API libraries .
[root@Global-RH yum.repos.d]# yum install libvirt
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Existing lock /var/run/yum.pid: another copy is running as pid 38921.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package libvirt.x86_64 0:0.9.10-21.el6 will be installed
--> Processing Dependency: radvd for package: libvirt-0.9.10-21.el6.x86_64
--> Processing Dependency: numad for package: libvirt-0.9.10-21.el6.x86_64
--> Processing Dependency: lzop for package: libvirt-0.9.10-21.el6.x86_64
--> Processing Dependency: libcgroup for package: libvirt-0.9.10-21.el6.x86_64
--> Processing Dependency: iscsi-initiator-utils for package: libvirt-0.9.10-21.el6.x86_64
--> Processing Dependency: ebtables for package: libvirt-0.9.10-21.el6.x86_64
--> Running transaction check
---> Package ebtables.x86_64 0:2.0.9-6.el6 will be installed
---> Package iscsi-initiator-utils.x86_64 0:6.2.0.872-41.el6 will be installed
---> Package libcgroup.x86_64 0:0.37-4.el6 will be installed
---> Package lzop.x86_64 0:1.02-0.9.rc1.el6 will be installed
--> Processing Dependency: liblzo2.so.2()(64bit) for package: lzop-1.02-0.9.rc1.el6.x86_64
---> Package numad.x86_64 0:0.5-4.20120522git.el6 will be installed
---> Package radvd.x86_64 0:1.6-1.el6 will be installed
--> Running transaction check
---> Package lzo.x86_64 0:2.03-3.1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================
Package Arch Version Repository Size
===========================================================================
Installing:
libvirt x86_64 0.9.10-21.el6 dvd 1.9 M
Installing for dependencies:
ebtables x86_64 2.0.9-6.el6 dvd 95 k
iscsi-initiator-utils x86_64 6.2.0.872-41.el6 dvd 654 k
libcgroup x86_64 0.37-4.el6 dvd 104 k
lzo x86_64 2.03-3.1.el6 dvd 55 k
lzop x86_64 1.02-0.9.rc1.el6 dvd 50 k
numad x86_64 0.5-4.20120522git.el6 dvd 24 k
radvd x86_64 1.6-1.el6 dvd 75 k
Transaction Summary
==========================================================================
Install 8 Package(s)
Total download size: 2.9 M
Installed size: 7.9 M
Is this ok [y/N]: y
Downloading Packages:
---------------------------------------------------------------------------
Total 3.0 MB/s | 2.9 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libcgroup-0.37-4.el6.x86_64 1/8
Installing : numad-0.5-4.20120522git.el6.x86_64 2/8
Installing : lzo-2.03-3.1.el6.x86_64 3/8
Installing : lzop-1.02-0.9.rc1.el6.x86_64 4/8
Installing : iscsi-initiator-utils-6.2.0.872-41.el6.x86_64 5/8
Installing : ebtables-2.0.9-6.el6.x86_64 6/8
Installing : radvd-1.6-1.el6.x86_64 7/8
Installing : libvirt-0.9.10-21.el6.x86_64 8/8
Installed products updated.
Verifying : radvd-1.6-1.el6.x86_64 1/8
Verifying : ebtables-2.0.9-6.el6.x86_64 2/8
Verifying : numad-0.5-4.20120522git.el6.x86_64 3/8
Verifying : lzop-1.02-0.9.rc1.el6.x86_64 4/8
Verifying : iscsi-initiator-utils-6.2.0.872-41.el6.x86_64 5/8
Verifying : lzo-2.03-3.1.el6.x86_64 6/8
Verifying : libvirt-0.9.10-21.el6.x86_64 7/8
Verifying : libcgroup-0.37-4.el6.x86_64 8/8
Installed:
libvirt.x86_64 0:0.9.10-21.el6
Dependency Installed:
ebtables.x86_64 0:2.0.9-6.el6 iscsi-initiator-utils.x86_64 0:6.2.0.872-41.el6 libcgroup.x86_64 0:0.37-4.el6 lzo.x86_64 0:2.03-3.1.el6
lzop.x86_64 0:1.02-0.9.rc1.el6 numad.x86_64 0:0.5-4.20120522git.el6 radvd.x86_64 0:1.6-1.el6
Complete!
[root@Global-RH yum.repos.d]# yum install libvirt-python
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Package libvirt-python-0.9.10-21.el6.x86_64 already installed and latest version
Nothing to do
[root@Global-RH yum.repos.d]#
5.Install “Virtual Machine Manager” aka “virt-manager” to manager virtual Machines.
[root@Global-RH yum.repos.d]# yum install virt-manager
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package libcacard.x86_64 0:0.15.0-2.el6 will be installed
---> Package spice-glib.x86_64 0:0.11-11.el6 will be installed
---> Package spice-gtk.x86_64 0:0.11-11.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================
Package Arch Version Repository Size
=======================================================================
Installing:
virt-manager x86_64 0.9.0-14.el6 dvd 1.0 M
Installing for dependencies:
gtk-vnc x86_64 0.3.10-3.el6 dvd 95 k
gtk-vnc-python x86_64 0.3.10-3.el6 dvd 17 k
libcacard x86_64 0.15.0-2.el6 dvd 41 k
spice-glib x86_64 0.11-11.el6 dvd 266 k
spice-gtk x86_64 0.11-11.el6 dvd 49 k
spice-gtk-python x86_64 0.11-11.el6 dvd 20 k
Transaction Summary
======================================================================
Install 7 Package(s)
Total download size: 1.5 M
Installed size: 7.0 M
Is this ok [y/N]: y
Downloading Packages:
-------------------------------------------------------------=---------
Total 3.1 MB/s | 1.5 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libcacard-0.15.0-2.el6.x86_64 1/7
Installing : spice-glib-0.11-11.el6.x86_64 2/7
Installing : spice-gtk-0.11-11.el6.x86_64 3/7
Installing : spice-gtk-python-0.11-11.el6.x86_64 4/7
Installing : gtk-vnc-0.3.10-3.el6.x86_64 5/7
Installing : gtk-vnc-python-0.3.10-3.el6.x86_64 6/7
Installing : virt-manager-0.9.0-14.el6.x86_64 7/7
Installed products updated.
Verifying : spice-gtk-python-0.11-11.el6.x86_64 1/7
Verifying : libcacard-0.15.0-2.el6.x86_64 2/7
Verifying : gtk-vnc-python-0.3.10-3.el6.x86_64 3/7
Verifying : spice-gtk-0.11-11.el6.x86_64 4/7
Verifying : gtk-vnc-0.3.10-3.el6.x86_64 5/7
Verifying : virt-manager-0.9.0-14.el6.x86_64 6/7
Verifying : spice-glib-0.11-11.el6.x86_64 7/7
Installed:
virt-manager.x86_64 0:0.9.0-14.el6
Dependency Installed:
gtk-vnc.x86_64 0:0.3.10-3.el6 gtk-vnc-python.x86_64 0:0.3.10-3.el6 libcacard.x86_64 0:0.15.0-2.el6 spice-glib.x86_64 0:0.11-11.el6
spice-gtk.x86_64 0:0.11-11.el6 spice-gtk-python.x86_64 0:0.11-11.el6
Complete!
[root@Global-RH yum.repos.d]#
All the above pakages can be installed in single command.
# yum install kvm virt-manager libvirt libvirt-python python-virtinst
Here is the step by step guide to creating the virtual machine using KVM.
Hope this article is informative to you .Thank you for reading.
Leave a Reply