Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destroy fails if virtual machine has checkpoints #1785

Open
abbbi opened this issue Oct 25, 2023 · 0 comments
Open

Destroy fails if virtual machine has checkpoints #1785

abbbi opened this issue Oct 25, 2023 · 0 comments

Comments

@abbbi
Copy link
Contributor

abbbi commented Oct 25, 2023

Latest libvirt versions have introduced checkpoints which are mostly used for backup purposes (https://libvirt.org/kbase/live_full_disk_backup.html)

In case a virtual machine deployed via vagrant-libvirt has such an existent checkpoint, destroy fails:

.vagrant.d/gems/3.1.4/gems/fog-libvirt-0.11.0/lib/fog/libvirt/requests/compute/vm_action.rb:7:in undefine': Call to virDomainUndefineFlags failed: Requested operation is not valid: cannot delete inactive domain with 3 checkpoints (Libvirt::Error)`

Possible solutions would be:

  1. during vagrant destroy, remove existent checkpoints just as it is done with snapshots, one problem might be that
    removing checkpoints is only possible if virtual machine is running, or the checkpoint must be removed with metadata
    option only.

  2. add flag during undefine that undefines the virtual machine and removes checkpoint metadata (like virsh handles with virsh undefine .. --checkpoints-metadata), if supported by the used libvirt version.

Workaround: remove checkpoints before issuing "vagrant destroy" using virsh.

The feature was "tech preview" as with libvirt version < 7006000 and can be considered beeing supported for any versions above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant