diff --git a/libxl-remove-cdrom-cachemode.patch b/libxl-remove-cdrom-cachemode.patch new file mode 100644 index 0000000..23f258d --- /dev/null +++ b/libxl-remove-cdrom-cachemode.patch @@ -0,0 +1,37 @@ +commit 3feb9059c31a5c08ec2c2ef81de439b6dec4f101 +Author: Jim Fehlig +Date: Thu Apr 28 11:30:19 2016 -0600 + + libxl: don't add cache mode for qdisk cdrom drives + + qemu commit 91a097e7 forbids specifying cache mode for empty + drives. Attempting to create a domain with an empty qdisk cdrom + drive results in + + qemu-system-x86_64: -drive if=ide,index=1,readonly=on,media=cdrom, + cache=writeback,id=ide-832: Must specify either driver or file + + libxl only allows an empty 'target=' for cdroms. By default, cdroms + are readonly (see the 'access' parameter in xl-disk-configuration.txt) + and forced to readonly by any tools (e.g. xl) using libxlutil's + xlu_disk_parse() function. With cdroms always marked readonly, + explicitly specifying the cache mode for cdrom drives can be dropped. + The drive's 'readonly=on' option can also be set unconditionally. + + Signed-off-by: Jim Fehlig + +Index: xen-4.7.0-testing/tools/libxl/libxl_dm.c +=================================================================== +--- xen-4.7.0-testing.orig/tools/libxl/libxl_dm.c ++++ xen-4.7.0-testing/tools/libxl/libxl_dm.c +@@ -1368,8 +1368,8 @@ static int libxl__build_device_model_arg + + if (disks[i].is_cdrom) { + drive = libxl__sprintf(gc, +- "if=ide,index=%d,readonly=%s,media=cdrom,cache=writeback,id=ide-%i", +- disk, disks[i].readwrite ? "off" : "on", dev_number); ++ "if=ide,index=%d,readonly=on,media=cdrom,id=ide-%i", ++ disk, dev_number); + + if (target_path) + drive = libxl__sprintf(gc, "%s,file=%s,format=%s", diff --git a/xen.changes b/xen.changes index d9a0c4a..1ce547c 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue May 3 17:25:08 UTC 2016 - jfehlig@suse.com + +- bsc#977329 - Xen: Cannot boot HVM guests with empty cdrom + libxl-remove-cdrom-cachemode.patch + ------------------------------------------------------------------- Tue May 3 08:25:27 MDT 2016 - carnold@suse.com diff --git a/xen.spec b/xen.spec index 7be2327..e7b1a3c 100644 --- a/xen.spec +++ b/xen.spec @@ -160,7 +160,7 @@ BuildRequires: xorg-x11-util-devel %endif %endif -Version: 4.7.0_01 +Version: 4.7.0_02 Release: 0 Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel) License: GPL-2.0 @@ -262,6 +262,7 @@ Patch403: xl-conf-default-bridge.patch Patch420: suspend_evtchn_lock.patch Patch421: xenpaging.doc.patch Patch422: stubdom-have-iovec.patch +Patch423: libxl-remove-cdrom-cachemode.patch # Other bug fixes or features Patch451: xenconsole-no-multiple-connections.patch Patch452: hibernate.patch @@ -578,6 +579,7 @@ Authors: %patch420 -p1 %patch421 -p1 %patch422 -p1 +%patch423 -p1 # Other bug fixes or features %patch451 -p1 %patch452 -p1