I had issues using incus move
which caused a state where the VM was still on its original host, but the storage volume was present on both hosts.
It’s easy in retrospect to realize that it wasn’t very smart to use the zfs destroy
command to get rid of these volumes, because I later noticed they still show up in the output of incus storage volume list
. Of course I probably should have used incus commands instead to delete them, but anyway this is my current situation:
incus storage volume list
shows onevirtual-machine
volume with1
“used by” as well as one snapshot for a VM that does not exist on thelocation
specified.zfs list
confirms this volume does not exist
Is there any way to “force delete” the volume from incus? I was hoping it could somehow detect that the underlying volume no longer exists and accept to delete it, but I get:
Error: Storage volumes of type "virtual-machine" cannot be deleted with the storage API
As an aside, I do think that even if I didn’t use zfs destroy
I probably could have ended up with issues anyway, since the incus move
command did result in the same pool being duplicated across two nodes without the VM actually being moved.
Any guidance on how to resolve issues like this? It’s not a huge issue but it’s not exactly comfortable either that this hostname is now reserved forever, since creating a new system with the same name causes a database constraint violation:
Error: Failed instance creation: Failed creating instance from image: Error inserting volume "foo" for project "default" in pool "bar" of type "virtual-machines" into database "UNIQUE constraint failed: index 'storage_volumes_unique_storage_pool_id_node_id_project_id_name_type'"
I can also mention that I have two additional “ghost volumes” which I assume are temporary but never disappeared correctly called move-of-2014907846865291386
as well as a snapshot with the same name as the VM (which is how I know they’re related).