<div dir="ltr">Hi Michal,<div><br></div><div>I think issuing a libvirt migrate to a host where the network disks don't already exist would be a prequisite failure.  Libvirt can never copy a network disk, but it shouldn't fail trying to migrate an existing domain that contains a network disk.  If a libvirt user wishes to migrate a domain that contains a network disk, it's their responsibility to ensure the disk exists before calling migrate.</div><div><br></div><div>Could you propose this patch to libvirt?<br></div><div><br></div><div>--</div><div>Noel</div><div><br></div><div><br></div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 19, 2015 at 3:45 AM, Michal Privoznik <span dir="ltr"><<a href="mailto:mprivozn@redhat.com" target="_blank">mprivozn@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 18.03.2015 22:00, Nick Bartos wrote:<br>
> Actually I messed that up slightly on the case.  My C is a bit rusty:<br>
><br>
> diff -U3 -r libvirt-1.2.13.orig/src/qemu/qemu_migration.c<br>
> libvirt-1.2.13/src/qemu/qemu_migration.c<br>
> --- libvirt-1.2.13.orig/src/qemu/qemu_migration.c2015-02-23<br>
> 22:04:12.000000000 -0800<br>
> +++ libvirt-1.2.13/src/qemu/qemu_migration.c2015-03-18<br>
> 13:55:45.873322477 -0700<br>
> @@ -1507,9 +1507,12 @@<br>
>              flags |= VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA;<br>
>          break;<br>
><br>
> +    case VIR_STORAGE_TYPE_NETWORK:<br>
> +        ret = 0;<br>
> +        goto cleanup;<br>
> +        break;<br>
>      case VIR_STORAGE_TYPE_BLOCK:<br>
>      case VIR_STORAGE_TYPE_DIR:<br>
> -    case VIR_STORAGE_TYPE_NETWORK:<br>
>      case VIR_STORAGE_TYPE_NONE:<br>
>      case VIR_STORAGE_TYPE_LAST:<br>
>          virReportError(VIR_ERR_INTERNAL_ERROR,<br>
<br>
</span>Sounds reasonable to me. Although I'm worried that there might be users<br>
using network disk, supplying different XML on migration, where the disk<br>
is switched to yet non-existent network disk, expecting libvirt/qemu to<br>
copy the data.<br>
<br>
The other option is: libvirt won't copy shared or read only disks. So<br>
OpenStack would mark network disks as shared.<br>
<br>
One way or another - do you want to propose a patch or should I do that?<br>
<span class="HOEnZb"><font color="#888888"><br>
Michal<br>
</font></span></blockquote></div><br></div></div>