[libvirt] [PATCHv4 1/4] Allow LUN type disks to have no source

Eric Blake eblake at redhat.com
Mon Sep 16 17:01:32 UTC 2013


On 09/09/2013 07:48 PM, Doug Goldstein wrote:
> CD-ROMs and Floppies are allowed to have no source to imply they are
> empty or disconnected. Since the LUN type is used for raw CD-ROM access
> with QEMU (and VMWare in the future), it also needs to allow an empty
> source when the raw CD-ROM device is disconnected from the domain.
> ---
>  src/conf/domain_conf.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

ACK.

> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index aed2a9d..a9ff61c 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -5218,9 +5218,11 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
>      }
>  
>      /* Only CDROM and Floppy devices are allowed missing source path
> -     * to indicate no media present */
> +     * to indicate no media present. LUN is for raw access CD-ROMs
> +     * that are not attached to a physical device presently */
>      if (source == NULL && hosts == NULL && !def->srcpool &&
>          def->device != VIR_DOMAIN_DISK_DEVICE_CDROM &&
> +        def->device != VIR_DOMAIN_DISK_DEVICE_LUN &&
>          def->device != VIR_DOMAIN_DISK_DEVICE_FLOPPY) {
>          virReportError(VIR_ERR_NO_SOURCE,
>                         target ? "%s" : NULL, target);
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130916/e7e2d9c6/attachment-0001.sig>


More information about the libvir-list mailing list