From 3ff493eca9deea298ab27d9c663883d40b519353f96b241ee19ae2e000e02dbf Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Thu, 23 Sep 2010 08:55:14 +0000 Subject: [PATCH] Fix CDROM media change for Xen PV domains OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=64 --- libvirt.changes | 7 +++++++ xen-pv-cdrom.patch | 20 ++++++++------------ xend-disk-order.patch | 2 +- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/libvirt.changes b/libvirt.changes index eee1902..5ea9e26 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Sep 23 02:42:39 MDT 2010 - jfehlig@novell.com + +- Fix CDROM media change for Xen PV domains + modified xen-pv-cdrom.patch + bnc#636231 + ------------------------------------------------------------------- Fri Sep 10 15:45:04 MDT 2010 - jfehlig@novell.com diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index 9d4da96..a4d3fc9 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -2,15 +2,11 @@ Index: libvirt-0.8.4/src/xen/xend_internal.c =================================================================== --- libvirt-0.8.4.orig/src/xen/xend_internal.c +++ libvirt-0.8.4/src/xen/xend_internal.c -@@ -5332,7 +5332,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co - } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { - virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); - } else { -- virBufferVSprintf(buf, "(dev '%s')", def->dst); -+ if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) -+ virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); -+ else -+ virBufferVSprintf(buf, "(dev '%s')", def->dst); - } - - if (def->src) { +@@ -1422,7 +1422,6 @@ xenDaemonParseSxprDisks(virDomainDefPtr + /* There is a case without the uname to the CD-ROM device */ + offset = strchr(dst, ':'); + if (!offset || +- !hvm || + STRNEQ(offset, ":cdrom")) { + virXendError(VIR_ERR_INTERNAL_ERROR, + "%s", _("domain information incomplete, vbd has no src")); diff --git a/xend-disk-order.patch b/xend-disk-order.patch index 7bc0bde..3ec5123 100644 --- a/xend-disk-order.patch +++ b/xend-disk-order.patch @@ -27,7 +27,7 @@ Index: libvirt-0.8.4/src/xen/xend_internal.c } if (VIR_ALLOC(disk) < 0) -@@ -1532,7 +1536,12 @@ xenDaemonParseSxprDisks(virDomainDefPtr +@@ -1531,7 +1535,12 @@ xenDaemonParseSxprDisks(virDomainDefPtr if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0) goto no_memory;