Fix CDROM media change for Xen PV domains

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=64
This commit is contained in:
James Fehlig 2010-09-23 08:55:14 +00:00 committed by Git OBS Bridge
parent 4dbc98eeb4
commit 3ff493eca9
3 changed files with 16 additions and 13 deletions

View File

@ -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

View File

@ -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"));

View File

@ -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;