Re: one qustion about the snapshot of the libvirt, thanks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux