From: David Scott <dave.scott@eu.citrix.com>
To: xen-devel <xen-devel@lists.xen.org>
Subject: libvirt, libxl and QDISKs
Date: Wed, 24 Apr 2013 15:22:11 +0100 [thread overview]
Message-ID: <5177EA93.7000403@eu.citrix.com> (raw)
Hi,
Now that libxl + qemu's built-in disk backend for ceph/rbd is working
nicely, I'm trying to get it all working through libvirt.
When libvirt's libxl driver creates a libxl_device_disk, it applies a
few simple rules[1] covering specific file format types (qcow, qcow2,
vhd). If none of these rules apply then it defers to libxl's best guess:
* If driverName is not specified, default to raw as per
* xl-disk-configuration.txt in the xen documentation and let
* libxl pick a suitable backend.
*/
x_disk->format = LIBXL_DISK_FORMAT_RAW;
x_disk->backend = LIBXL_DISK_BACKEND_UNKNOWN;
The libxl code in libxl__device_disk_set_backend[2] tries to resolve
'UNKNOWN' into something concrete by calling 'disk_try_backend':
disk_try_backend(&a, LIBXL_DISK_BACKEND_PHY) ?:
disk_try_backend(&a, LIBXL_DISK_BACKEND_TAP) ?:
disk_try_backend(&a, LIBXL_DISK_BACKEND_QDISK);
Unfortunately for me and my quest, the case for LIBXL_DISK_BACKEND_TAP
just checks for
* lack of hotplug script
* libxl__blktap_enabled
* DISK_FORMAT_{RAW,VHD}
and so it selects TAP and then fails, because tapdisk doesn't know
anything about this disk access protocol (yet at least). Unbeknownst to
libxl, qemu would be able to handle the disk in this case.
I'm not sure what the best way to address this is. I could disable
blktap on my system but it would be a shame to drop support for the
stuff tapdisk does well (like .vhd handling)
On the other hand, having both tapdisk and qemu means having to choose
between them for disk protocols they could both handle. A choice would
either have to be coded in libxl (or libvirt's libxl driver), which
seems like a bit of an annoying maintenance burden (i.e. update the list
every time someone adds a driver somewhere); or it could be left to the
sysadmin to choose via some kind of resolver script, which seems a bit
complex.
A third possibility is to be able to ask tapdisk, "do you actually
support this disk" and if yes, use it in preference to qemu, if no fall
back to qemu.
Anyone got any thoughts? (Or perhaps I've missed something obvious! :-)
Cheers,
Dave
[1]
http://libvirt.org/git/?p=libvirt.git;a=blob;f=src/libxl/libxl_conf.c;h=7e0753a69ed4a0867d14843cbad20d1430a67f0c;hb=HEAD#l462
[2]
http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/libxl/libxl_device.c;h=eeea9d9a023877a69ff2832c973e753629333356;hb=HEAD#l219
next reply other threads:[~2013-04-24 14:22 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 14:22 David Scott [this message]
2013-04-24 15:55 ` libvirt, libxl and QDISKs Stefano Stabellini
2013-04-25 8:55 ` Ian Campbell
2013-04-25 10:36 ` George Dunlap
2013-04-25 11:33 ` Ian Campbell
2013-04-25 11:55 ` Stefano Stabellini
2013-04-25 11:57 ` Ian Campbell
2013-04-25 12:12 ` David Scott
2013-04-25 12:43 ` Ian Campbell
2013-04-25 13:22 ` David Scott
2013-04-25 13:56 ` Ian Campbell
2013-04-26 1:27 ` Jim Fehlig
2013-04-26 4:50 ` Jim Fehlig
2013-04-26 10:37 ` David Scott
2013-04-26 23:44 ` Jim Fehlig
[not found] ` <517B1170.4020300@suse.com>
2013-04-29 9:41 ` David Scott
2013-04-26 8:49 ` Ian Campbell
2013-04-26 10:10 ` Stefano Stabellini
2013-04-26 10:13 ` Ian Campbell
2013-04-26 10:28 ` Stefano Stabellini
2013-04-26 11:31 ` Marek Marczykowski
2013-04-26 11:40 ` Ian Campbell
2013-04-26 11:48 ` Stefano Stabellini
2013-04-26 13:27 ` Ian Campbell
2013-04-26 17:10 ` Stefano Stabellini
2013-04-29 8:23 ` Ian Campbell
2013-04-29 10:07 ` Stefano Stabellini
2013-04-26 11:50 ` Marek Marczykowski
2013-04-29 21:00 ` Jim Fehlig
2013-04-26 11:45 ` Stefano Stabellini
2013-04-26 14:36 ` Roger Pau Monné
2013-04-25 18:26 ` Sylvain Munaut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5177EA93.7000403@eu.citrix.com \
--to=dave.scott@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.