From: Fabio Fantoni Subject: Re: [PATCH] Don't use tapdisk for cd-roms Date: Thu, 02 May 2013 15:58:39 +0200 Message-ID: <5182710F.7010200@m2r.biz> References: <1367492589-28970-1-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1367492589-28970-1-git-send-email-george.dunlap@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Ian Jackson , Stefano Stabellini , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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 Tested-by: Fabio Fantoni > CC: Fabio Fantoni > CC: Ian Jackson > CC: Stefano Stabellini > CC: Ian Campbell > --- > 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, > case LIBXL_DISK_BACKEND_TAP: > 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 While the command is working removing "type:", for example: xl cd-insert W7 hdb /mnt/vm/iso/Clonezilla.iso is working.