KVM Guest Management With Virt-Manager On Ubuntu 8.10

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Sun, 2009-02-08 18:56. :: KVM | Ubuntu | Desktop | Virtualization

KVM Guest Management With Virt-Manager On Ubuntu 8.10

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Last edited 02/05/2009

Virt-Manager (Virtual Machine Manager) is a graphical interface for managing KVM and Xen guests on the local and also on remote systems. You can use it to start, stop, pause, create, and delete guests, and you can connect to the guests using the graphical console. This guide shows how you can use it to manage KVM guests on an Ubuntu 8.10 desktop.

I do not issue any guarantee that this will work for you!

 

1 Preliminary Note

Make sure that you have a KVM host (can be on the same machine or on a remote system) that you can connect to using virt-manager. You can use this guide to set up KVM on an Ubuntu 8.10 host: Virtualization With KVM On Ubuntu 8.10.

Creating guests is supported only if virt-manager is installed directly on the KVM host.

 

2 Installing Virt-Manager

Open the Synaptic Package Manager (System > Administration > Synaptic Package Manager):

Type in your password:

In Synaptic, search for virt-manager...

... and virt-viewer and mark both packages for installation; click on Apply afterwards:

Confirm your selection by clicking on Apply again:

Afterwards, both packages and their dependencies are installed:

Click on Close afterwards and leave Synaptic:

 

2.1 Make Virt-Manager Run With root Privileges

Normally virt-manager is run as a normal user (i.e., without root privileges). This is fine as long as you only want to start, stop, or pause KVM guests. If you want to create or delete KVM guests (works only if KVM is installed on the same system!), virt-manager must be run with root privileges.

If KVM is installed on the same system as virt-manager, and you want to create or delete KVM guests, open a terminal (Applications > Accessories > Terminal) and open the file /usr/bin/virt-manager:

sudo gedit /usr/bin/virt-manager

Insert the word sudo between exec and python so that the file looks as follows:

#!/bin/sh

exec sudo python "/usr/share/virt-manager/virt-manager.py" "$@"

That's it - virt-manager will be executed with root privileges from now on.


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Anonymous (not registered) on Tue, 2009-06-16 02:39.
This may be a 9.04-only issue, but when I changed the virt-manager script to "exec sudo python...," it wouldn't launch. I had to go into Preferences --> Main Menu --> System Tools/Virtual Machine Manager --> Properties and change the command to "gksudo virt-manager." That worked for me.
Submitted by Johne283 (not registered) on Sun, 2014-06-29 21:43.
Hi there! I know this is kind of off topic but I was wondering if you knew where I could locate a captcha plugin for my comment form? I'm using the same blog platform as yours and I'm having difficulty finding one? Thanks a lot! ekedbagfgdfa
Submitted by Kelvin Nicholson (not registered) on Mon, 2009-08-10 12:45.
This might be specific to just 9.04, but instead of editing the file, you can just add yourself to the KVM and libvirt groups in Users and Groups.
Submitted by Big Ben (not registered) on Sat, 2010-11-06 06:07.

Our installation of 10.04 hangs up with 'exec sudo python...'  but works fine with 'exec gksudo....'

....and of course will not create the VM file without it!

 

Many thanks for a super HowTo - Ben