one qustion about the snapshot of the libvirt, thanks.

Guozhonghua guozh88 at chinatelecom.cn
Mon Sep 6 06:55:55 UTC 2021


Hi, Peter

I really appreciate it.

Thank you!




 
From: Peter Krempa
Date: 2021-09-06 14:37
To: Guozhonghua
CC: libvirt-users
Subject: Re: one qustion about the snapshot of the libvirt, thanks.
On Tue, Aug 31, 2021 at 16:09:50 +0800, Guozhonghua wrote:
> 
> Hello, 
> 
> When we test snapshot features and review the code of libvirt, there is one question, not an issue. 
> 
>     /* do the memory snapshot if necessary */
>     if (memory) {
>         /* check if migration is possible */
>         if (!qemuMigrationSrcIsAllowed(driver, vm, false, 0))
>             goto cleanup;
> 
> While making one snapshot with memory on one vm, but it is not allowed while the vm which has some src devices, such as pci devs, with which the vm is not allowed to be migrated.
> I want to known the reason, why should  it check this conditions? 
 
The reason for this check is that the state of host devices namely PCI
devices can't be serialized by qemu and saved in the snapshot. That
means that when reverting the devices would not be configured properly
and would not work.
 
Internally qemu and libvirt use the migration code to serialize the
state of the VM and that is the reason why 'qemuMigrationSrcIsAllowed'
is called here, because it uses the same implementation.
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20210906/2e89c9a0/attachment.htm>


More information about the libvirt-users mailing list