
On 08/21/2013 01:51 PM, Daniel P. Berrange wrote:
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. Right. I will do that using -drive and resend.
/* 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