[libvirt] [RFC PATCHv4 15/15] qemu: support fd: migration with compression

Eric Blake eblake at redhat.com
Fri Mar 25 23:46:24 UTC 2011


On 03/09/2011 07:18 PM, Eric Blake wrote:
> Spawn the compressor ourselves, instead of requiring the shell.
> 
> * src/qemu/qemu_driver.c (qemuDomainMigrateToFile): Spawn
> compression helper process when needed.
> ---
>  src/qemu/qemu_driver.c |   37 ++++++++++++++++++++++++++++++++-----
>  1 files changed, 32 insertions(+), 5 deletions(-)

Phooey.  Testing this reveals that we have a bigger problem.  If
save_image_format in qemu.conf is not raw, then we use -incoming fd:22
for 'virsh restore dom.sav'; however, we tie it to a pipe fd created by
virExec.  And virExec creates the libvirt side of the pipe as cloexec.
So the side of the pipe that we hand to qemu is closed on exec, and the
restore side causes qemu to fail with:
Migration failed. Exit code fd:23(-9), exiting.

That has to be fixed before I can test whether this patch works, since
it takes a save/restore cycle on a compressed image to feel 100%
confident (although I think that save side is correct, given that
everything prior to the qemu getting EBADF worked correctly as I was
stepping through the debugger).

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list