[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Don't use tapdisk for cd-roms

Il 02/05/2013 13:03, George Dunlap ha scritto:
blktap does not support the insert / eject commands, and so is not
suitable for cd-roms.

This fixes the bug where libxl uses tapdisk as a cdrom back-end, causing
subsequent eject / insert commands to fail.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Tested-by: Fabio Fantoni <fabio.fantoni@xxxxxxx>
CC: Fabio Fantoni <fabio.fantoni@xxxxxxxxxx>
CC: Ian Jackson <ian.jackson@xxxxxxxxxx>
CC: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
  tools/libxl/libxl_device.c |    6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
index a826ece..a5cf446 100644
--- a/tools/libxl/libxl_device.c
+++ b/tools/libxl/libxl_device.c
@@ -178,6 +178,12 @@ static int disk_try_backend(disk_try_backend_args *a,
          if (a->disk->script) goto bad_script;
+ if (a->disk->is_cdrom) {
+            LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
+                       " unsuitable for cdroms",
+                       a->disk->vdev);
+            return 0;
+        }
          if (!libxl__blktap_enabled(a->gc)) {
              LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
                         " unsuitable because blktap not available",
Tested with xen unstable and qemu upstream, domU windows 7 pro 64 bit with GPLPV and it is working! :-)
Thanks! I waited cd hotswap working for a long time.

The only thing to fix it seems the help that actually shows:

xl cd-insert --help
Usage: xl [-vfN] cd-insert <Domain> <VirtualDevice> <type:path>

While the command is working removing "type:", for example:

xl cd-insert W7 hdb /mnt/vm/iso/Clonezilla.iso
is working.

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.