Up and Running with KVM, Ubuntu Style: Part Three
Once you go graphical with KVM's Virtual Machine Manager, you might never go back to the command line.
Monday, January 3rd, 2011
It’s finally time to give you what you’ve all waited so patiently for: A graphical way to manage your KVM virtual machines. Yes, many of you are command line purists but this week’s entry is for those who aren’t. This week you’ll learn how to use The Virtual Machine Manager for KVM. You can read the run-up to this denouement here and here.
The Basics
The first step toward KVM-induced graphical bliss is to install the Virtual Machine Manager (VMM), and any dependencies, from a repository.
$ sudo apt-get install virt-manager
Like most things in Ubuntu, it’s that simple. You’re ready to dive into VMM and manage your VMs from a graphical interface.
Virtual Machine Management
If you have a user name that is a member of the kvm group, you may invoke and use virt-manager as that user. You create, delete, start, stop and fully manage VMs with the account but you can only see that user’s VMs. User-created VMs are only visible to that user, just as root-created VMs are only visible to the root user. To start the Virtual Machine Manager, use the following command to use virt-manager with root privileges.
$ sudo virt-manager
You’ll notice that there’s no trailing ‘&’ in the command string. When you run virt-manager remotely or locally, it doesn’t appreciate explicitly told to run in background. Run it as shown and your prompt will return to you without the ‘&.’ When the Virtual Machine Manager first appears, it does so in “Disconnected” mode as shown in Figure 1.

Figure 1: Virtual Machine Manager Disconnected State
Right click localhost (System) and then click Connect. Once connected, you’ll see your list of VMs and their status as shown in Figure 2.

Figure 2: All Virtual Machines List in VMM
Use the View selector to choose the list of VMs you want to see in VMM. Your choices are: All, Active or Inactive virtual machines. A right click on any VM will open a menu with options (Depending on the VM’s current state) to Run, Pause, Shutdown or to view Details or Open a console. See Figure 3.

Figure 3: Starting a VM via the Right Click Menu
Comments on "Up and Running with KVM, Ubuntu Style: Part Three"
so this actually has nothing to do with ubuntu, right? virt-manager certainly works just like that under, eg, fedora.
correct. i setup a test bed using the development branch of virt-manager on fedora 14 for spice protocol — a few bugs here and there but it’s quite a decent setup. probably a while away from production ready though.