|
|
c401cc |
From edf9c32b8680db0a4c0037ee2ddd37e29640811e Mon Sep 17 00:00:00 2001
|
|
|
c401cc |
Message-Id: <edf9c32b8680db0a4c0037ee2ddd37e29640811e@dist-git>
|
|
|
c401cc |
From: Doug Goldstein <cardoe@cardoe.com>
|
|
|
c401cc |
Date: Wed, 26 Feb 2014 14:54:08 +0100
|
|
|
c401cc |
Subject: [PATCH] Allow LUN type disks to have no source
|
|
|
c401cc |
|
|
|
c401cc |
https://bugzilla.redhat.com/show_bug.cgi?id=1032370
|
|
|
c401cc |
|
|
|
c401cc |
CD-ROMs and Floppies are allowed to have no source to imply they are
|
|
|
c401cc |
empty or disconnected. Since the LUN type is used for raw CD-ROM access
|
|
|
c401cc |
with QEMU (and VMWare in the future), it also needs to allow an empty
|
|
|
c401cc |
source when the raw CD-ROM device is disconnected from the domain.
|
|
|
c401cc |
|
|
|
c401cc |
(cherry picked from commit 3efbe13f4d9a7e92ab3f6f526bc43615c04b132e)
|
|
|
c401cc |
|
|
|
c401cc |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
c401cc |
---
|
|
|
c401cc |
src/conf/domain_conf.c | 4 +++-
|
|
|
c401cc |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
c401cc |
|
|
|
c401cc |
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
|
|
c401cc |
index 7e43232..9456758 100644
|
|
|
c401cc |
--- a/src/conf/domain_conf.c
|
|
|
c401cc |
+++ b/src/conf/domain_conf.c
|
|
|
c401cc |
@@ -5328,9 +5328,11 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
|
|
|
c401cc |
}
|
|
|
c401cc |
|
|
|
c401cc |
/* Only CDROM and Floppy devices are allowed missing source path
|
|
|
c401cc |
- * to indicate no media present */
|
|
|
c401cc |
+ * to indicate no media present. LUN is for raw access CD-ROMs
|
|
|
c401cc |
+ * that are not attached to a physical device presently */
|
|
|
c401cc |
if (source == NULL && hosts == NULL && !def->srcpool &&
|
|
|
c401cc |
def->device != VIR_DOMAIN_DISK_DEVICE_CDROM &&
|
|
|
c401cc |
+ def->device != VIR_DOMAIN_DISK_DEVICE_LUN &&
|
|
|
c401cc |
def->device != VIR_DOMAIN_DISK_DEVICE_FLOPPY) {
|
|
|
c401cc |
virReportError(VIR_ERR_NO_SOURCE,
|
|
|
c401cc |
target ? "%s" : NULL, target);
|
|
|
c401cc |
--
|
|
|
c401cc |
1.9.0
|
|
|
c401cc |
|