Creating an RHEL 6 KVM Virtual Machine

Texto completo


Creating an RHEL 6 KVM Virtual Machine

From Techotopia

KVM based virtual machines can easily be configured on Red Hat Enterprise Linux 6 using either the virt-install command-line tool, or the virt-manager GUI tool. For the purposes of this chapter we will use the virt-manager tool to install Windows 7 as a KVM guest on an RHEL 6 host.

The command-line approach to virtual machine creation will be covered in the next chapter entitled Creating RHEL 6 Hosted KVM Virtual Machines with virt-install and virsh.

Ads by Google Virtual Machine KVM VMware for Linux Install PDF


Previous Table of Contents Next

Creating an RHEL 6 KVM Networked Bridge Interface

Creating RHEL 6 Hosted KVM Virtual Machines with virt-install and virsh

Purchase and download the full PDF and ePub versions of this RHEL 6 eBook for only $9.99

PDF/ePub edition contains 40 chapters and over 250 pages.



Starting the Virtual Machine Manager

Begin by launching virt-manager either by selecting the Applications -> System Tools -> Virtual Machine Manager menu option, or from the command-line in a terminal window by running virt-manager. If virt-manager fails to start with a message that reads “Unable to open

MongoDB storage server MongoDB node for storage noSQL hardware platform MongoDB

Download Virtual Machine Manage & Monitor Your IT Cloud. Download Spiceworks Service Tools!

Are You a Fresher? Join Placement Oriented 4 Month IT Course Designed for Fresh Grads

connection to the libvirt management daemon” it will be necessary to open a terminal window (Applications -> System Tools -> Terminal) and run the following commands before attempting to start virt-manager once again:

Once loaded, the virtual machine manager will prompt for the root password prior to displaying the following screen:

The main virt-manager screen lists the current virtual machines running on the system. At this point there should only be one, the hypervisor running on the host system. By default the manager should be connected to the host. If it is not, connect to the host system by right clicking on the entry in the list and selecting Connect from the popup menu.

To create a new virtual system, click on the new virtual machine button (the far left button on the toolbar) or right click on the hypervisor entry and select New from the resulting menu to display the first screen of the New VM wizard. In the Name field enter a suitably descriptive name for the virtual system. On this screen, also select the location of the media from which the guest operating system will be installed. This can either be a CD or DVD drive, an ISO image file accessible to the local host, a network install using HTTP, FTP, NFS or PXE or the disk image from an existing virtual machine:

su –

/sbin/service libvirtd start


Essentials eBook



Note that beneath the Name field the dialog displays the connection type (QEMU/KVM in this case). If the connection on your system is displayed as QEMU your system either does not have Intel-VT or AMD-V support, or these features have been disabled in the BIOS. That being the case your guest operating system will run inside QEMU based emulation, and will not use the faster KVM hardware based virtualization.

Configuring the KVM Virtual System


Once these settings are complete, click Forward to configure CPU and memory settings. The optimal settings will depend on the number of CPUs and amount of physical memory present in the host and the requirements of other applications and virtual machines that will run in parallel with the new virtual machine:

The last item to configure before creating the virtual machine is the storage space for the guest operating system and corresponding user data. This takes the form of a virtual disk image or pre-existing storage. A virtual disk drive is essentially an image file hosted on the file system of the host computer which is seen by the virtual machine as a physical disk drive.

Options are available to create an image disk of a specified size, select a pre-existing volume or to create a storage volume of a specified format (raw, vmdk, iso etc). Unless you have a specific need to use a particular format (for example you might need to use vmdk to migrate to a VMware based virtualization environment at a later date) or need to use a dedicated disk or partition, it is generally safe to simply specify a size on this screen. The option is also available to pre-allocate the space now. If you choose not to pre-allocate the space, space will be allocated up to the specified maximum only as it is needed by the guest operating system. This has the advantage that space on the host file system is not used until it is needed. Downsides are that performance may degrade as space is allocated in real-time and allocation will fail if another process uses up the free space on the host file system before it can be assigned to the virtual machine:



Starting the KVM Virtual System

Click on the Finish button to begin the creation process. The virtualization manager will create the disk and configure the virtual machine before starting the system. The new virtual machine will appear in the main virt-manager window with the status set to Running as illustrated in the following figure:

By default, the console for the virtual machine should appear in the virtual machine viewer window. To view the console of the running machine at any future time, ensure that it is selected in the virtual machine list and select the Open button from the toolbar. The virtual machine viewer should be ready for the installation process to begin:


From this point on, simply follow the operating installation instructions to install the guest OS in the KVM virtual machine. For information on administering a virtual system read Managing and Monitoring RHEL 6 based KVM Guest Systems.

Purchase and download the full PDF and ePub versions of this RHEL 6 eBook for only $9.99

PDF/ePub edition contains 40 chapters and over 250 pages.

Previous Table of Contents Next


This page was last modified 20:27, 1 April 2011. Copyright 2011 All Rights Reserved.

Retrieved from ""