Lxd vm using btrfs - error copied a vm to another name, modified it, deleted original then tried to move it back to the original name

ubuntu 20.04.2
snap lxd v4.20

My default storage pool is BTRFS

I had created a VM named test
then
lxc copy test test1

I made modifications to “test1” VM and later decided to replace “test” VM with it so I

$ lxc delete test
then tried to

lxc move test1 test

and got this error?

Error: Rename instance: Failed to rename “/var/snap/lxd/common/lxd/storage-pools/default/virtual-machines/test1” to “/var/snap/lxd/common/lxd/storage-pools/default/virtual-machines/test”: rename /var/snap/lxd/common/lxd/storage-pools/default/virtual-machines/test1 /var/snap/lxd/common/lxd/storage-pools/default/virtual-machines/test: file exists

If I’d deleted the “test” VM doesn’t all of it go away including the storage it used? Or is this something w my using BTRFS this time.

Yeah, that should have been deleted, could be that there was an error preventing the complete deletion of that path?

Did you try manually running a rmdir to make this go away?

yes…
I did a
# find /var -name test

found the file
deleted it manually

still got that error.

Stephane

I am trying to reinstall things again so don’t spend any time on this now.

If it was supposed to delete everything as I had thought then I’ll dig some more when I reinstall.