Source /mnt/md1/media is currently in use by 'helloworld2' instance

I was playing with 25.04-rc.1 and tonight upgraded to 25.04.
Slowly setting up my TrueNAS Core Jails as TrueNAS Scale LXC Containers.

I am attempting to set up another instance, when I got the following error.

Source /mnt/md1/media is currently in use by 'helloworld2' instance

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/service/crud_service.py", line 287, in nf
    rv = await func(*args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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/instance.py", line 439, in do_create
    verrors.check()
  File "/usr/lib/python3/dist-packages/middlewared/service_exception.py", line 72, in check
    raise self
middlewared.service_exception.ValidationErrors: [EINVAL] virt_instance_create.source: Source /mnt/md1/media is currently in use by 'helloworld2' instance

This didn’t happen on 25.04-rc.1. I was able to use the same dataset in multiple Instances.

Any ideas?

I see it’s because of this PR

But I can’t get access to the Jira to understand why this is a supported use case.

This was a pretty typical thing that was done I thought? I did it all the time in TrueNAS Core. Sharing the dataset to the jails.

We had some edge cases where it was possible to put the same zvol into two separate instances (which of course results in data corruption) and so validation maybe got too strict. Create a new jira ticket for it.

I would, but I can’t get access to Jira.

I get as far as trying to send my email address a validation code, but I never get it.

https://ixsystems.atlassian.net/browse/NAS-135371
Opened a ticket for you and made it visible.

Is this right? VMs can’t share datasets?

I thought it was zVols we didn’t want to share.

VMs mount zvols, not datasets.