JoaoJandre commented on issue #9524:
URL: https://github.com/apache/cloudstack/issues/9524#issuecomment-2305151250

   > Hi @JoaoJandre, there is a similar functionality for VM snapshots without 
memory [Introduced in this PR](https://github.com/apache/cloudstack/pull/3724) 
and [this PR allows it for NFS/Local 
storage](https://github.com/apache/cloudstack/pull/8062) It doesn't support VM 
snapshots for stopped VMs but I think it will be a small change What I got from 
[libvirt docs](https://libvirt.org/html/libvirt-libvirt-domain-snapshot.html) 
and a few forums is that using the flag `VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE` is 
discouraged.
   > 
   > > If flags includes 
[VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE](https://libvirt.org/html/libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE),
 then the libvirt will attempt to use guest agent to freeze and thaw all file 
systems in use within domain OS. However, if the guest agent is not present, an 
error is thrown. Moreover, this flag requires 
[VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY](https://libvirt.org/html/libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY)
 to be passed as well. For better control and error recovery users should 
invoke 
[virDomainFSFreeze](https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainFSFreeze)
 manually before taking the snapshot and then 
[virDomainFSThaw](https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainFSThaw)
 to restore the VM rather than using 
[VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE](https://libvirt.org/html/libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE).
   > 
   > Probably you could leave the usage of virDomainFSFreeze/virDomainFSThaw to 
be executed by the value of the quiesceVm parameter and by the state of the VM 
(running/stopped).
   
   Hello, @slavkap
   
   I'm aware of the current functionality, but I was not aware that it was made 
to support NFS/Local storage. Regardless, I have listed (in the spec) a few 
other issues with it:
   
   1. It does not support VM snapshots for stopped VMs;
   2. The process is based on the volume snapshot, which is much slower as we 
take one snapshot at a time, instead of using one command for all the volumes;
   3. The VM is frozen (regardless of the user's orders) during the whole 
snapshot process, including the copy of the snapshots, which is a huge waste of 
time for the VM (this is made worse by the point above);
   4. The proposed implementation will not copy the snapshots, making the 
snapshot creation/reversion process much faster;
   
   In any case, this feature will only be used for NFS/SMP/Local storage, for 
the other types of storage (such as RBD or iSCSi), the implementation 
introduced in #3724 will still be used.
   
   Regarding the domain freeze/thaw, the quote you posted says "For better 
control and error recovery users should invoke virDomainFSFreeze manually 
before taking the snapshot and then virDomainFSThaw to restore the VM rather 
than using VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE.", I saw the implementation of 
the freeze/thaw and there doesn't seem to be any error recovery attempt, so 
using it instead of the quiesce parameter does not seem any better. I'm not 
sure what type of error recovery we could do to be fair; so again, I don't see 
a point in using the freeze/thaw.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to