Issue with instances after deleting dataset

I’m not sure if this is a bug or just a one off issue that I ran into recently while making some changes to VMs and datasets.

I had two datasets supporting three different instances; one dataset hosted a single windows VM, and a second dataset hosted two Linux VMs. These datasets were on two different sets of ZFS mirrored disks.

In any case, I no longer needed the windows vm so I deleted it. Once it was gone, I also removed the dataset from Truenas, choosing to delete all data when I did so. Truenas let me remove and wipe the drives. All was well so far.

However, after a reboot the next day, the Instances tab showed no VMs remaining with a message at the top right that just said “Error”. I was a little alarmed thinking that I had lost my VMs for some reason.

Anyway, lost story short, even though I had deleted the VM and the dataset that hosted it from Truenas, it was not actually gone from the system.

Once I started poking around the Incus logs, sure enough there was an error:

“level=error msg=“Failed mounting storage pool” err=“Failed to run: zpool import windows_pool: exit status 1 (cannot import ‘windows_pool’: no such pool available)” pool=windows_pool”

Windows_pool was the name of the dataset that I had deleted. It would appear that removing a dataset from Truenas did not remove it from Incus nor did deleting the window VM remove the volume from the storage.

:blush: sudo incus storage list
±-------------±-------±------------±--------±------------+
| NAME | DRIVER | DESCRIPTION | USED BY | STATE |
±-------------±-------±------------±--------±------------+
| vm_pool | zfs | | 3 | CREATED |
±-------------±-------±------------±--------±------------+
| windows_pool | zfs | | 1 | UNAVAILABLE |
±-------------±-------±------------±--------±------------+

:blush: sudo incus storage volume list windows_pool
±-------±--------±------------±-------------±--------+
| TYPE | NAME | DESCRIPTION | CONTENT-TYPE | USED BY |
±-------±--------±------------±-------------±--------+
| custom | neptune | | block | 0 |
±-------±--------±------------±-------------±--------+

As a result, Incus was in a bad state and even existing VMs and pools couldn’t load.

I had to use the CLI to deal with this by first removing the Windows volume and then by removing the volume itself.

:blush: sudo incus storage volume delete windows_pool neptune
:blush: sudo incus storage delete windows_pool

Anyway, maybe someone will find this helpful.

I get that Instances are experimental but exposing some more Incus features in the GUI would be very helpful. Or at least having a way to read the logs without dropping down to the CLI and using sudo.

Hopefully Truenas will stick to one virtualization solution and mature the feature set over time.

1 Like