January 8, 2014

Virtualization with KVM on RHEL 6

Install KVM

Verify Installation

Check that kvm kernel modules are loaded. There should be two: kvm and either kvm_intel or kvm_amd.

If kvm_intel or kvm_amd is not loaded, try to load it. E.g. kvm_intel.

In my case, I recieved an error. And in the general RHEL log file, i recieved the following.

So for my HP Elite 7500 I had to enable Virtualization in the BIOS:

  1. Computer Setup
  2. Security
  3. System Security
  4. Virtualization Technology (VTx/VTd): Enable
  5. Save and reboot

NOTE: REALLY TRY TO FIX THE PROBLEM OF NOT HAVING LOADED THE KVM_INTEL OR KVM_AMD, OTHERWISE WILL THINGS GO REALLY SLOW.

Start KVM

Prerequisite RHEL DVD

The easiest way to distribute the RHEL 6 DVD is to actually use the ISO. To make it accessible for the KVM, we place it under libvirt default images folder.

Finally we need to restore the SELinux type for the ISO file.

Install Guest Virtual Machine Graphically

The easiest way is to do it graphically with Virtual Machine Manager

If you had a kickstart file, you could here press TAB and enter the URI for the kickstart file.

Make sure you auto starts the default network. Otherwise you have to manually start it, every time you boot.

Since this is a virtual server, you can fill the entire virtual disk with RHEL.

A nice feature before writing the new partition table to disk is to preview. You do that with the option at the bottom.

Again the RHEL installation will stretch the entire virtual disk, so cleaning the Master Boot Record, MBR, is no problem. But if you were to install a system along with other OS, you must have good strategy how these OS can work alongside and be booted.

The most common installation is for server is Minimal and for client it is Desktop.

Install Guest Virtual Machine CLI

Install Guest Virtual Machine CLI with Kickstart

You can automate the entire installation process of new virtual guest in line, with the help of a kickstart file.

To do this you need to extract the ISO file, for example an FTP server. On the FTP server

Manage Virtual Machine

List all virtual machines.

Auto start of virtual machine.

Disable auto start of virtual machine.

Stop virtual machine.

Start virtual machine.

Remove Virtual Machine

No comments: