Virtual machines not working after moving pool

I had to take a snapshot, replicated my pool to a backup and rebuild the main storage and then replicated it back.

Now my Vm won’t work, when i go to select the pool in Instances General section I get this error:
[EFAULT] Internal storage validation failed: Failed checking volumes on pool “default”: Instance “Pterodactyl” in project “default” has pool name mismatch in its backup file (“DupPool” doesn’t match’s pool’s “default”)

I tried the command to update the pool names.
like this:
[truenas]> virt global update
o[0%] …
Error: Internal storage validation failed: Failed checking volumes on pool “default”: Instance “Pterodactyl” in project “default” has pool name mismatch in its backup file (“DupPool” doesn’t match’s pool’s “default”)
same with doing virt global update pool=DupPool.

It keeps complaining about the VM itself “Pterodactyl” that has a config error but I don’t know how to change that or where that config even is.
I mounted the dataset DupPool/.ix-virt/virtual-machines/Pterodactyl and browsed around in there for config files and found nothing that made sense.

also btw this is the zvol for that VM
DupPool/.ix-virt/custom/default_test-vp1qhj

is that where the “default” error comes from?

Here is a list of the dataset info also:
root@truenas[~]# zfs list | grep virt
DupPool/.ix-virt 36.5G 2.29T 192K legacy
DupPool/.ix-virt/buckets 128K 2.29T 128K legacy
DupPool/.ix-virt/containers 128K 2.29T 128K legacy
DupPool/.ix-virt/custom 36.5G 2.29T 128K legacy
DupPool/.ix-virt/custom/default_test-vp1qhj 36.5G 2.29T 36.5G -
DupPool/.ix-virt/deleted 884K 2.29T 160K legacy
DupPool/.ix-virt/deleted/buckets 128K 2.29T 128K legacy
DupPool/.ix-virt/deleted/containers 128K 2.29T 128K legacy
DupPool/.ix-virt/deleted/custom 128K 2.29T 128K legacy
DupPool/.ix-virt/deleted/images 128K 2.29T 128K legacy
DupPool/.ix-virt/deleted/virtual-machines 128K 2.29T 128K legacy
DupPool/.ix-virt/images 128K 2.29T 128K legacy
DupPool/.ix-virt/virtual-machines 8.48M 2.29T 128K legacy
DupPool/.ix-virt/virtual-machines/Pterodactyl 8.10M 2.29T 8.02M legacy
DupPool/.ix-virt/virtual-machines/Pterodactyl.block 176K 2.29T 176K -

1 Like

I got it working.

I had to mount the VM:
mount -t zfs DupPool/.ix-virt/virtual-machines/Pterodactyl /mnt/test2

Edit the backup.yaml

The pool part should be like this(your pool names will of course be different):
pool:
config:
source: DupPool/.ix-virt
zfs.pool_name: DupPool/.ix-virt
description: “”
name: default ← this is the part it complains about. it used to be DupPool
driver: zfs
used_by:
status: Created
locations:

  • none

Anything that says “name” that is not “default” has to be changed to default.

Now for bonus points… I initially made it:DupPool/.ix-virt/
DO NOT DO THIS, that trailing “/” breaks everything and you CANNOT undo or fix this easily…

After 10000000 more google searches I got the answer:
incus admin sql global “UPDATE storage_pools_config SET value=‘DupPool/.ix-virt’ WHERE value=‘DupPool/.ix-virt/’”
I got the result “2 rows affected” and immediately my vm started to work!

This was disgustingly frustrating and I really wish there was better up to date guides on migrating pools without the entire world falling apart every time.

In my searches I found quite a few people that ran into similar issues where they couldn’t replace a failed disk because of a small size difference and had to do a replicate, nuke the pool, rebuild pool with new drives, migrate back - nothing is working.