+++ This bug was initially created as a clone of Bug #960934 +++
When merging a snapshot disk, we have a transient situation where the data of the merged snapshot exists twice - in the source and target.
We must make sure we have this space for a successful merge:
| File Domain | Block Domain
-----|-----------------------------------------|-------------
qcow | preallocated : 1.1 * disk capacity |1.1 * min(used ,capacity)
| sparse: 1.1 * min(used ,capacity) |
-----|-----------------------------------------|-------------
raw | preallocated: disk capacity |disk capacity
| sparse: min(used,capacity)
The related commands to the above scenario are RemoveSnapshotCommand and RemoveDiskSnapshotsCommand.
Verify in two ways:
1. Remove a snapshot from vm tab, snapshots subtab.
2. Remove a disk snapshot from the storage tab, snapshots subtab.
Say we have B + S1 + S2, all 10G.
SD should have extra available space for 20G (the maximum size merge of the two snapshots). Domain with less than 20G free space should fail and 20G+ should succeed.