Re: [libvirt PATCH 06/20] qemu_snapshot: use virDomainDiskByName while updating domain def

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

 



On Mon, Mar 13, 2023 at 16:42:07 +0100, Pavel Hrdina wrote:
> When creating external snapshot this function is called only when the VM
> is not running so there is only one definition to care about. However,
> it will be used by external snapshot revert code for active and inactive
> definition and they may be different if a disk was (un)plugged only for
> the active or inactive definition.
> 
> The current code would crash so use virDomainDiskByName() to get the
> correct disk from the domain definition based on the disk name and make
> sure it exists.

Historically the snapshot code expects that virDomainSnapshotAlignDisks
was ran and thus the disk and snapshot definitions are in sync.

> Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
> ---
>  src/qemu/qemu_snapshot.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux