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

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

 



On Wed, Aug 21, 2013 at 01:47:36PM -0300, Aline Manera wrote:
> From: Aline Manera <alinefm@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]