Failed to import instances

Hello All.

I just upgraded to Fangtooth from EE 24.10.

In my old setup there was two virtue machines: Openwrt and Windows Server.

After importing zvols to Instances and manually configuring the VMs, I can confirm Openwrt worked fine. Windows Server managed to start but I cannot connect to RDP.

Before I tried to connect to VNC for the Windows Server to trouble shoot, Instances went wrong.

I get this error message

[EFAULT] Failed importing instance “windows-server” in project “default”: Failed unmounting instance: Failed to unmount “/var/lib/incus/storage-pools/Download/virtual-machines/windows-server”: device or resource busy

The detail info is as below

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 515, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 560, in __run_body
    rv = await self.method(*args)
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/api/base/decorator.py", line 88, in wrapped
    result = await func(*args)
             ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/virt/global.py", line 177, in do_update
    await job.wait(raise_error=True)
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 463, in wait
    raise self.exc_info[1]
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 515, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 560, in __run_body
    rv = await self.method(*args)
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/virt/global.py", line 269, in setup
    await self._setup_impl()
  File "/usr/lib/python3/dist-packages/middlewared/plugins/virt/global.py", line 573, in _setup_impl
    await self.recover(to_import)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/virt/global.py", line 416, in recover
    raise CallError(result.get('error'))
middlewared.service_exception.CallError: [EFAULT] Failed importing instance "windows-server" in project "default": Failed unmounting instance: Failed to unmount "/var/lib/incus/storage-pools/Download/virtual-machines/windows-server": device or resource busy

I know Instances now is just a experimental feature. So I was trying to play around as this is not a production machine. Data in those two VMs are not important. I can delete them if needed.

From the error message it seems that something went wrong with the Windows Server VM. But I don’t know how to troubleshoot. Now the Instances service cannot start properly as Windows Server is configured as Auto Run.

Setting up two new VMs is acceptable to me. If there is some way to delete the Windows VM that would be great. I remeber in EE if app services faild to start, you can delete the ix dataset and use saved config files to start over again. But here for Instances I didn’t find that option. Deleting the zvol for Windows VM also didn’t help.

Does anyone know how to solve this issue?

I tried reset system configuration to default. It didn’t solve the issue.

As long as I chose the orginal pool for instances, the issue came back. So I think this might be related to the dataset that Instances use.

But I cannot see that dataset in the WebUI so there is no way to make changes to it given that CLI is not recommended in the release notes.