From Fedora Project Wiki


Virtualization

In this section, we cover discussion on the @et-mgmnt-tools-list, @fedora-xen-list, and @libvirt-list of Fedora virtualization technologies.

Contributing Writer: Dale Bewley


Fedora Virtualization List

This section contains the discussion happening on the fedora-virt list.

New Release libguestfs 1.0.10

Richard Jones announced[1] release 1.0.10 of Package-x-generic-16.pnglibguestfs[2].

Born only a couple of weeks ago(FWN#171[3]), libguestfs has progressed very far very fast. The package is currently being reviewed[4] for inclusion the Fedora repo.

"libguestfs is a library for accessing and modifying guest disk images. Amongst the things this is good for: making batch configuration changes to guests, getting disk used/free statistics (see also: Package-x-generic-16.pngvirt-df), migrating between virtualization systems (see also: virt-p2v), performing partial backups, performing partial guest clones, cloning guests and changing registry/UUID/hostname info, and much else besides."

Features in 1.0.10 include:

  • bindings for: C, C++, Perl, Python, OCaml, Ruby, Java and shell scripting
  • KVM support
  • QEMU binary is completely configurable at compile & runtime
  • ext4 support
  • support for uploading and downloading arbitrary-sized files
  • support for uploading and downloading tar and tar.gz content
  • support for querying size of block devices, setting r/o
  • support for reading ext2/3 superblocks
  • stat, lstat, statvfs commands
  • commands to mount filesystems read-only
  • run arbitrary commands from the guest
  • file(1) command
  • readline in guestfish with history and tab completion
  • guestfish 'edit' command
  • big documentation improvements, including more on the internals
  • pkgconfig file

Richard posted some example uses[5] of the libguestfs command line tool called guestfish.


Non-root User Image Locations

Robert Day asked[1] "by default, new VM images are created in /var/lib/libvirt/images, and that directory is not accessible to non-root users."

Daniel Berrange [2]

There are two classes of libvirt driver connection

 - Privileged, per-host connections
 - Unprivileged, per-user connections

Xen provides a per-host connection. UserModeLinux and QEMU provide 
both (qemu:///system and qemu:///session). VirtualBox just proivides
a per-user instance (vbox:///session) and so on.

Now by default in Fedora, when connecting to QEMU, virt-manager will
use the privileged per-host connection, so VMs end up in the system
directory /var/lib/libvirt/images.

Our goal (perhaps for F12) should be for local desktop virt use
cases to use the unprivileged  QEMU connection qemu://session
by default, and have VM disk images stored in your home directory
> How would we allow KVM access? Unix groups or something else?

Two options

 - A UNIX group for /dev/kvm
 - Just make it world writable


In theory now KVM no longer pins all guest RAM into host RAM, it is 
reasonable safe to allow users to access it without any restrictions.
(eg option 2) Will need to confirm with KVM developers if this is 
really so, but that was the intention last time i asked them.

[3]

Historically SELinux has wanted images in particular locations. With
the introduction of SVirt in libvirt, we have much more advanced
SELinux integration and will in fact automatically re-label images
to match the needs of a VM. So allowing arbitary locations *and*
still being in compliance with SELinux policy is now practical

Only libvirt Bug Fixes in updates-testing

Daniel Berrange described "introducing major new features into the stable release stream" as a problem[1] and switch to "a pretty strong bugfix only policy..." Mark McLoughlin announced[2] that this has now happened:

  • Package-x-generic-16.pnglibvirt 0.6.1 has been unpushed from F9 and F10 updates-testing
  • The latest version available in F9 and F10 updates is 0.5.1
  • We do not expect to push new versions to F9 and F10, only bug fix updates for 0.5.1

The rapid speed of Fedora releases every 6 months can not keep up with the lightning fast libvirt releases happening every month[3]. To gain access to the new features and technologies offered by these new releases, Mark offers "We are still planning on setting up a 'preview' repository where the latest versions of virt packages from rawhide will be available to Fedora stable release users".

In the meantime Daniel Veillard posts[4] a src rpm with each release[5] and "I also build binaries rpms for the flavour of the day I run on my workstation which is why you will find signed binaries too for F9 x86_64".

Fedora Virtualization Status Report

Mark McLoughlin provided[1] another excellent round up of the latest bugs and developments with virtualization in Fedora.

Fedora Xen List

This section contains the discussion happening on the fedora-xen list.

Dom0 Kernel Not Before 2.6.31

The upstream Xen dom0 work done by Jeremy Fitzhardinge has been cleaned up and reorganized[1] into

Michael Young built[2] a new experimental dom0 kernel "version (2.6.30-0.1.2.21.rc3.xendom0.fc12) is based on the Fedora devel kernel branch and xen-tip/next branch from the pvops kernel repository." This kernel may be found in Michael's yum repo[3].

Michael added that "very few xen patches made it into 2.6.30, just bugfixes and tidy ups, so we are waiting at least until 2.6.31[4] for mainline dom0 support."

Libvirt List

This section contains the discussion happening on the libvir-list.

New Release libvirt 0.6.3

Daniel Veillard announced[1] a new Package-x-generic-16.pnglibvirt release, version 0.6.3.

"The main points are the VirtualBox driver and a number of bug fixes." Read the post for details of other changes.

New features:

  • VirtualBox driver support (Pritesh Kothari)
  • virt-xml-validate new command (Daniel Berrange)

Improvements:

  • add SCSI storage rescan (David Allan)
  • rootless LXC containers support improvements (Serge Hallyn)
  • getHostname support for LXC (Dan Smith)
  • cleanup and logging output of some domain functions (Guido Gunther)
  • drop pool lock when allocating volumes (Cole Robinson)
  • LXC handle kernel without CLONE_NEWUSER support (Serge Hallyn)
  • cpu pinning on defined Xen domains (Takahashi Tomohiro)
  • dynamic bridge names support (Soren Hansen)
  • LXC use of private /dev/pts when available (Daniel Berrange)
  • virNodeDeviceCreateXML and virNodeDeviceDestroy entry points (Dave Allan)

Daniel Veillard followed the announcement with a roadmap [2] suggesting "a new release around May 25, which would mean entering code feature freeze around May 18". Version 0.6.2 was released April 3rd (FWN#170[3]).

KVM Migration Support in F11

Abhishek Jha [1] "needed to know if libvirt supports migration via the QEMU/KVM driver. ( virDomainMigrate)".

Daniel Berrange answered[2] "Yes it is supported in KVM >= 79, or QEMU >= 0.10.0 and libvirt 0.6.0 IIRC." With the latest version of Package-x-generic-16.pnglibvirt available for Fedora 10 being 0.5.1, this means migration of KVM guests will not be supported in Fedora until F11 comes out next month.[3]

"ALso note that successful migration depends on the hardware config of your guest. In theory any config should work, but in practice there have been bugs in the device state save/restore process of various types of device. So test your particular VM config successfully migrates before relying on it in production."