File-based disk-only VM snapshot with KVM as hypervisor #10632
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR implements the spec available at #9524. For more information regarding it, please read the spec.
Furthermore, the following changes that are not contemplated in the spec were added:
snapshot.merge.timeout
agent property was added. It is only considered iflibvirt.events.enabled
is true;libvirt.events.enabled
is true, ACS will register to gather events from Libvirt and will collect information on the process, providing a progress report in the logs. If the configuration is false, the old process is used;Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Basic Tests
I created a test VM to carry out the tests below. Additionally, after performing the relevant operations, the VM's XML and the storage were checked to observe if the snapshots existed.
Snapshot Creation
The tests below were also repeated with the VM stopped.
Snapshot Reversion
Snapshot Removal
Advanced Tests
Deletion Test
All tests were carried out with the VM stopped.
The snapshot was marked as hidden and was not removed from storage.
Snapshot s3 was removed normally. Snapshot s2 was merged with snapshot s4.
Snapshot s4 was marked as hidden and was not removed from storage.
Snapshot s5 was removed normally. Snapshot s4 was merged with the delta of the VM's volume.
Reversion Test
Snapshot s1 was marked as hidden and was not removed from storage.
Concurrent Test
I created 4 VMs and took a VM snapshot of each. Then, I instructed to remove them all at the same time. All snapshots were removed simultaneously and successfully.
Test with Multiple Volumes
I created a VM with one datadisk and attached 8 more datadisks (10 volumes in total), took two VM snapshots, and then instructed to remove one at a time. The snapshots were removed successfully.
Tests Changing the
snapshot.merge.timeout
ConfigTests Related to Volume Resize with Disk-Only VM Snapshots on KVM
qemu-img info
qemu-img info
The last two tests were repeated on a VM with several snapshots, so that a merge between snapshots was performed. The result was the same.
Tests Related to Events:
cloud.usage_event
table that the resize event was correctly triggered, and it was also observed via GUI that the account's resource limit was updated.