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@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
[ ijc -- nuked extra blank line ]
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.