stackhpc / ansible-role-libvirt-vm

This role configures and creates VMs on a KVM hypervisor.
128 stars 67 forks source link

`state: absent` should first destroy VMs before attempting to remove volumes #18

Closed JPvRiel closed 5 years ago

JPvRiel commented 5 years ago

While using an LVM based storage pool, I noticed Failed to delete volume errors. libvirt seems to tolerate removing qcow2 storage before destroying the VM, but lvm logical volumes cannot be remove before the VM has been stopped (destroyed).

A simple fix is to switch the order of included tasks in tasks/main.yml.

(I hope to submit a PR with some enhancements in due course)