libvirt/xen-pv-cdrom.patch

17 lines
682 B
Diff

Index: libvirt-0.4.6/src/xend_internal.c
===================================================================
--- libvirt-0.4.6.orig/src/xend_internal.c
+++ libvirt-0.4.6/src/xend_internal.c
@@ -5158,7 +5158,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co
def->device == VIR_DOMAIN_DISK_DEVICE_CDROM ?
"cdrom" : "disk");
} 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) {