[libvirt] [PATCH 0/4] qemu: Don't lose domain on failed restore
Daniel Henrique Barboza
danielhb413 at gmail.com
Mon Jan 13 15:14:57 UTC 2020
On 1/13/20 7:58 AM, Michal Privoznik wrote:
> When restoring a domain we might leave a qemu process behind.
> The problem is described in 4/4 in more detail, but the digest is: we
> start qemu process successfully but then fail to restore its vCPUs and
> leave qemu process running and forget about. I thought of two possible
> ways to fix this:
> 1) Kill qemu process and claim error.
> 2) Don't kill qemu process and don't remove it from our internal list
> and claim error.
> I lean towards 1) because I find it clearer. If I were a mgmt app and
> call 'virsh restore /path/to/domain.save' then I'd much rather see
> either success or an error without any need for cleanup (which would be
> implied if we went with number 2).
> Michal Prívozník (4):
> qemuDomainSaveImageStartVM: Use VIR_AUTOCLOSE for @intermediatefd
> qemuDomainSaveImageStartVM: Use g_autoptr() for virCommand
> qemu: Use g_autoptr() for qemuDomainSaveCookie
> qemu: Stop domain on failed restore
Reviewed-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
> src/qemu/qemu_domain.c | 28 ++++++++++------------------
> src/qemu/qemu_domain.h | 1 +
> src/qemu/qemu_driver.c | 37 +++++++++++++++++--------------------
> 3 files changed, 28 insertions(+), 38 deletions(-)
More information about the libvir-list