Home > virtualization > KVM and Virt-Manager On Ubuntu 8.04

KVM and Virt-Manager On Ubuntu 8.04

You’ve been seeing a lot of virtualization specific posts recently here at Ubuntu Tutorials.  I’ve been tinkering with a number of virtualization options, namely VMware Server, Virtualbox and now KVM with Virt-Manager.

I’m not going to go into comparing the three in this post, but I will say that KVM is the only solution that will let me run 64bit guests on my 64bit host.  It also cleanly manages networking, whereas VirtualBox still has issues there.  KVM is still fairly new however so the UI features are not as nice as the other two.

Installing The Packages

Assuming your machine will support KVM (generally, core 2 duo and later) lets get the right packages installed.

sudo aptitude install kvm virt-manager libvirt-bin

This will install the Virt-Manager graphical interface for creating and managing your virtual installations.  It’ll also install the kernel module to make use of the KVM instruction set and the libvirt library.

Initial Setup

Once you’ve got the right packages installed you’ll need to give yourself access to the KVM device.  This is done simply enough using:

sudo gpasswd -a username libvirtd

This will require you to logout and login again.  When you get back we’ll get Virt-Manager launched and some virtual machines built.  Go ahead, relogin.  I’ll wait…

Running Virt-Manager

Virt-Manager is a nice kvm/qemu/xen management interface developed by the good folks at RedHat.  This utility makes it really easy to create, manage and delete virtual installations.  You can launch Virt-Manager via the command line, or the Applications menu.

virt-manager

Troubleshooting

If you have VirtualBox installed you may run into conflicts between the kernel modules.  Make sure to remember to remove the conflicting module before you run either of the virtualization solutions.  You can do this by using these commands.

To remove the VirtualBox module:

sudo modprobe -r vboxdrv

To remove the KVM module:

sudo modprobe -r kvm-intel

Enjoy.

Updated: added user to libvirtd group instead of kvm group. Removed launching with sudo.

If this article has been helpful, please consider linking to it.

Related Posts

  1. Vadim P.
    June 8th, 2008 at 14:36 | #1

    I tried KVM before, but the windows install was failing for some odd reasons in it. I’ll give it a try when I’ll be needing a 64bit ubuntu though later on.

  2. T.C.
    June 9th, 2008 at 01:26 | #2

    virt-manager works as regular user if you add yourself to “libvirtd” group. You don’t need to add yourself to the “kvm” group.

  3. dremon
    June 9th, 2008 at 02:40 | #3

    There is no need to run virt-manager with sudo as long as the user is added to the libvirtd group.

  4. lovag
    June 9th, 2008 at 08:21 | #4

    “I will say that KVM is the only solution that will let me run 64bit guests on my 64bit host.”

    I am not agree with you…

    I have as host Ubuntu 8.04 64bit, running VMWare server 1.0.5 and I have guests using 64bit OS (Ubuntu 8.04) and I have no problems with this…

    Just my 2cents

  5. June 9th, 2008 at 09:11 | #5

    Is there a way to switch ISOs with virt-manager now? I tried using it before, but once your virtual CD-ROM had an iso in it, the only way I found to change disks was to shut down the VM, delete the CD-ROM, and create a new CD-ROM pointing to a new ISO.

  6. Divan Santana
    June 20th, 2008 at 03:11 | #6

    KVM vrs XEN

    Found this
    http://linuxtoday.com/news_story.php3?ltsn=2008-06-19-023-26-NW-HE-RH
    Looks like KVM is the way to go in the future.

  7. June 25th, 2008 at 08:05 | #7

    I just installed and when i try to run the jeos install when booting from cd the keyboard is not accessible and have no reaction from it (send ctrl-alt-del …)

    This is on an remote server with hardy+kvm
    and i login to it with -X

  8. anonymous
    July 1st, 2008 at 21:08 | #8

    asa-ayers, did you ever find a solution to switching ISO files when the VM is running? It seems the same as https://bugs.launchpad.net/ubuntu/+source/virt-manager/+bug/230359

  9. July 23rd, 2008 at 18:04 | #9

    perfect! but is there anyway to switch from cd to iso?

  10. Andres
    July 27th, 2008 at 01:14 | #10

    I did the “aptitude install kvm virt-manager libvirt-bin” but can not find any KVM package under to download. Seems that my list of apt-get sites is not the most appropiate… Any suggestion of site to add to my list so I can download the package ?

    Thks

  11. August 18th, 2008 at 09:38 | #11

    The ubuntu install worked for i386 on an x86-64 host

    so now i can test it
    http://mapopa.blogspot.com/2008/08/installing-kvm-for-conference-for.html