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

[Xen-changelog] [xen master] libxl: Tell qemu to use raw format when using a tapdisk



commit 7e88c23239591e2638bcc944151a660fcd53495b
Author:     George Dunlap <george.dunlap@xxxxxxxxxxxxx>
AuthorDate: Tue Dec 9 14:04:19 2014 +0000
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Dec 16 12:47:41 2014 +0000

    libxl: Tell qemu to use raw format when using a tapdisk
    
    At the moment libxl unconditinally passes the underlying file format
    to qemu in the device string.  However, when tapdisk is in use,
    tapdisk handles the underlying format and presents qemu with
    effectively a raw disk.  When qemu looks at the tapdisk block device
    and doesn't find the image format it was looking for, it will fail.
    
    This effectively means that tapdisk cannot be used with HVM domains at
    the moment except for raw files.
    
    Instead, if we're using a tapdisk backend, tell qemu to use a raw file
    format.
    
    Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    [ ijc -- nuked extra blank line ]
---
 tools/libxl/libxl_dm.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index b25b574..c2b0487 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -797,11 +797,13 @@ static char ** 
libxl__build_device_model_args_new(libxl__gc *gc,
                     continue;
                 }
 
-                if (disks[i].backend == LIBXL_DISK_BACKEND_TAP)
+                if (disks[i].backend == LIBXL_DISK_BACKEND_TAP) {
+                    format = qemu_disk_format_string(LIBXL_DISK_FORMAT_RAW);
                     pdev_path = libxl__blktap_devpath(gc, disks[i].pdev_path,
                                                       disks[i].format);
-                else
+                } else {
                     pdev_path = disks[i].pdev_path;
+                }
 
                 /*
                  * Explicit sd disks are passed through as is.
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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