[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Allow a HTTP URL for cdrom ISO image



On Wed, Aug 21, 2013 at 01:47:36PM -0300, Aline Manera wrote:
> From: Aline Manera <alinefm br ibm com>
> 
> QEMU/KVM already allows an HTTP URL for the cdrom ISO image so add this support
> to libvirt as well.
> The xml should be as following:
> 
>     <disk type='network' device='cdrom'>
>       <source protocol='http' name='/url/path'>
>         <host name='host.name' port='80'/>
>       </source>
>     </disk>
> 
> Signed-off-by: Aline Manera <alinefm br ibm com>

> @@ -8090,7 +8098,13 @@ qemuBuildCommandLine(virConnectPtr conn,
>                  break;
>              }
>  
> -            virCommandAddArg(cmd, "-drive");
> +            if ((disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM) &&
> +                (disk->type == VIR_DOMAIN_DISK_TYPE_NETWORK)) {
> +                virCommandAddArg(cmd, "-cdrom");
> +            }
> +            else {
> +                virCommandAddArg(cmd, "-drive");
> +            }

This is not right. -cdrom is legacy syntax we should never be using
anymore.

>  
>              /* Unfortunately it is not possible to use
>                 -device for floppies, or Xen paravirt
> @@ -8135,7 +8149,9 @@ qemuBuildCommandLine(virConnectPtr conn,
>                                                 ? 'B' : 'A',
>                                                 bootindex);
>                      }
> -                } else {
> +                } else if (disk->device != VIR_DOMAIN_DISK_DEVICE_CDROM || 
> +                           (disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM &&
> +                           disk->type != VIR_DOMAIN_DISK_TYPE_NETWORK)) {
>                      virCommandAddArg(cmd, "-device");

This is bogus too for the same reason.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]