Bug #5145
Snapshots metadata keeps in VM after disk detach
Status: | Closed | Start date: | 05/08/2017 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Jaime Melis | % Done: | 0% | |
Category: | Drivers - VM | |||
Target version: | Release 5.4 | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: | OpenNebula 5.2 |
Description
Snapshot metadata should be removed after disk was detached from VM.
If snapshots metadata is not removed and some other disk is attached to VM, you cannot create new snapshots, because they already exist in virus domain object.
virsh snapshot-list --domain one-7589
delete all
virsh snapshot-delete one-7589 {disk_id}-{starting_snapshot_id} --metadata --children
ex.: virsh snapshot-delete one-7589 2-0 --metadata --children
starting_snapshot_id can be > 0, if disk with existing snapshots was attached and some new snapshots was created, so we need to check if before deleting.
Associated revisions
B #5145: Drop domain snapshots before live-migrate
Otherwise the migration fails on existing snapshots:
"error: Requested operation is not valid: cannot migrate domain with 3 snapshots"
History
#1 Updated by Kristian Feldsam about 4 years ago
- Assignee set to Jaime Melis
Pull request: https://github.com/OpenNebula/one/pull/299
#2 Updated by Stefan Kooman about 4 years ago
This also prevents VM's with a DISK Snapshot (not DOMAIN snapshot) from being live migrated through ONE to other hosts (as it's seen as a DOMAIN snapshot). Recently found out about this when doing host maintenance (some VM's could not be live migrated :/).
#3 Updated by Kristian Feldsam about 4 years ago
I can confirm what Stefan said. I also have this experience.
My pull request solve this problem by not saving disk snapshot metadata to domain
#4 Updated by Vlastimil Holer about 4 years ago
Javi has cherrypicked main part of the PR 299, thanks for the patch!
There is another PR https://github.com/OpenNebula/one/pull/316
to fix the live migration with domain snapshots.
#5 Updated by Vlastimil Holer about 4 years ago
- Status changed from Pending to Closed
- Resolution set to fixed