KVM, virt-manager, etc.

Soren Hansen soren at ubuntu.com
Mon Jan 28 13:22:19 GMT 2008

On Mon, Jan 28, 2008 at 12:19:50PM +0000, Matt Zimmerman wrote:
> > In case anyone missed my blog post about it last week, the
> > (admittedly quick and dirty) wiki page is at:
> > 
> >    https://wiki.ubuntu.com/KvmVirtManagerEtc
> I made a few trivial changes to the page along the way as I tried this out.

Great. Thanks for that.

> Some questions and comments:
>  * Is there a plan to wrap the tools or otherwise eliminate the need for
>    non-obvious command line arguments (e.g. qemu:///system)?

Yes. I started out by changing the default in libvirt itself, but it
turned out there was simply too much stuff linking against libvirt that
depended on the default to be xen://. I'll be changing the default for
virsh and virt-manager instead, and I'm still considering a wrapper of
some sort. virsh was not designed with user friendliness in mind, but
rather as a simple way to expose almost the entire libvirt api to a cli.

>  * I assume it's possible to create the VM using the command-line
>  tools as well as the GUI.  Can this be added to the documentation?
>  Since our use cases are server-oriented, I think this is important.

Yes, this is possible. virt-manager uses python-virtinst to do the
installation bit and that comes with a cli as well.

> * The only option available on "Choose a virtualization method" was
> "fully virtualized" (presumably that is expected) and "Enable kernel /
> hardware acceleration" was disabled.  The processor in my test system
> (AMD Athlon(tm) 64 X2 Dual Core Processor 4400+) seems to be listed on
> http://wiki.xensource.com/xenwiki/HVM_Compatible_Processors though
> perhaps it is the wrong stepping.  Is there a canonical way to
> determine whether it supports the extensions?  

Yes. From kvm's package description:

   * Run this command in a shell: egrep '^flags.*(vmx|svm)'

   If it prints anything, the processor provides hardware virtualization
   support and is suitable for use with KVM.

However, virt-manager determines it based on whether /dev/kvm exists. If
you have a recent kvm version installed, it ought to detect if you have
the required cpu extensions and load the corresponding modules, so
either you have an old kvm, lack the hardware, or it's simply disabled
in the bios. Check dmesg for more details.

> * Due to the above, I wasn't actually able to test creating a guest.
> It tried to invoke qemu and failed (because it wasn't installed).

Yes, this is rather unfortunate. I'd like it to work, but I'm not too
keen on making qemu a hard dependency of virt-manager, I'd rather not
have to push qemu into main along with virt-manager.

> * We should provide reasonable defaults for every aspect of creating a
> new VM.  The experience we are aiming for is to enable a new Ubuntu
> installation to have a virtual guest created immediately, with no
> decisions necessary: this should be a single command, or
> "next->next->next->finish" operation.

Just to clarify: You want to avoid having the user interact with the
installer inside the vm altogether?

> - System Name can be autogenerated as a default

Good idea, based on the name of the vm. I believe roughly the same
restrictions are imposed on vm names as host names.

> - Should point to an installable Ubuntu image of some sort by default.
> I have ISOs lying around, but most servers won't.  What can we do
> here?

Good question. Offer to download it or let the admin point to a local
copy on the file system?

> - Storage should default to a simple file of an appropriate size,
> stored in a standard location (perhaps not the user's home directory)

Currently, it's the directory from which you invoked virt-manager.
Somewhere under /var/lib would make sense (if you're not using raw disk

> * libvirtd failed to come up after a reboot, due to /var/run/libvirt
> not being created.  Is this a known bug?

Yes, pending upload.

Soren Hansen
Ubuntu Server Team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20080128/e6d539eb/attachment.pgp 

More information about the ubuntu-devel mailing list