Open danielhb opened 8 years ago
Hi @danielhb!
In a discussion in the ML, @pvital suggested to ask user to delete or not the disks files.
So basically, the DELETE /plugins/kimchi/vms/
If user wants to remove the disks, he/she needs to use DELETE /plugins/kimchi/storagepools/
If you agree, we can use this issue for this feature as all scenarios you described will be also covered.
Steps to reproduce using virsh:
We'll notice that the VM disks will remain untouched after the VM delete. This happens because the code that deletes a VM removes the storage that Kimchi is aware of, using storagepools/storagevolumes objects, instead of going through the VM XML and delete all the disks.
This was a minor issue when only VMs created outside of Kimchi were affected, but after Live Migration we can re-create this same scenario inside Kimchi:
I believe that this can be fixed by verifying the VM XML after deleting all the storage Kimchi knows about and see if there's anything left to be erased. We just need to be careful not to erase any CD-ROM image declared as well.
I believe we can further enhance how Kimchi delete works but I'll create a separated issue about it.