Ubuntu 8.04 has introduced a new option for virtualization: Virt-Manager. Using Virt-Manager, libvirt, and KVM, you can take advantage of the virtualization hardware built-in to recent CPUs.

Virt-Manager is a GUI for managing virtual machines with the Libvirt toolkit. KVM is the infrastructure in the Linux kernel that uses Intel and AMD’s virtualization extensions. I installed and set up Virt-Manager with KVM on Ubuntu 8.04, where they are both easily installable from the repositories.

Here are some screenshots:
Virt-Manager windows
Virt-Manager VM

You’ll need to find out if your CPU has virtualization support and whether it is turned on. Support may be turned off in your BIOS. Running the command below appropriate for your CPU manufacturer will produce output if KVM support is found:

  • Intel CPUs:
    grep vmx /proc/cpuinfo
  • AMD CPUs:
    grep svm /proc/cpuinfo

Once you find that your KVM support is working, start the installation:

  1. Install the packages for virt-manager, libvirt-bin, and kvm:
    sudo apt-get install virt-manager libvirt-bin kvm
  2. Add your user to the kvm group so you can run it as your normal user:
    sudo adduser $USER kvm
  3. Log out and back in to make the group change take effect.
  4. Try running kvm in a terminal. If you get usage information and no errors, then KVM is working.
  5. Start Virt-Manager from Applications->System Tools->Virtual Machine Manager.
  6. Whenever you open Virt-Manager you’ll need to click connect to QEMU. Click File->Open Connection. Set Hypervisor to QEMU and Connection to Local. You should now see the connection in the main list.
  7. Select your connection and click New to create a new virtual machine using the step-by-step guide. When you get to the step Choosing a Virtualization Method check Enable kernel / hardware acceleration.

Once your VM is set up, right click on it in the list and click Run to open it. Also, click Details for more configuration.

One problem you’ll likely notice is that Virt-Manager uses a VNC server to display the guest, which causes graphical slowdowns. There’s an option to add a SDL graphics device similar to VirtualBox. Open the VM details dialog, and select the Hardware tab. Find the existing display device and remove it. Click Add, and in the wizard select Graphics device and Local SDL Window. The display will be much faster now, but it will be in a simple QEMU window without the VM controls. You can still administer the VM from the main Virt-Manager window.

Virt-Manager is definitely much more powerful and server-oriented than my favorite virtualization app, VirtualBox. Most casual VM users will be better to use VirtualBox or VMware. Power VM users can take advantage of the more advanced configurability and server support. However, Virt-Manager with KVM does seems to run faster than VirtualBox.


Related Posts