FreeNAS/freenas 983311esrc/middlewared/middlewared/plugins/virt instance.py, src/middlewared/middlewared/test/integration/assets virt.py

NAS-134443 / 25.04.0 / Make sure virt instance is stopped before attempting to delete it (by Qubad786) (#15990)

DeltaFile
+11-6src/middlewared/middlewared/plugins/virt/instance.py
+0-4src/middlewared/middlewared/test/integration/assets/virt.py
+11-102 files

FreeNAS/freenas 79f9525src/middlewared/middlewared/plugins/virt instance.py, src/middlewared/middlewared/test/integration/assets virt.py

Make sure virt instance is stopped before attempting to delete it

(cherry picked from commit ff762ef7e18229a156c77f3b828dedd4c67b3d93)
DeltaFile
+11-6src/middlewared/middlewared/plugins/virt/instance.py
+0-4src/middlewared/middlewared/test/integration/assets/virt.py
+11-102 files

FreeNAS/freenas af8b25dsrc/middlewared/middlewared/plugins/virt instance.py, src/middlewared/middlewared/test/integration/assets virt.py

NAS-134443 / 25.10 / Make sure virt instance is stopped before attempting to delete it (#15988)

## Problem

There has been a case where an incus instance was not able to delete
because incus complained that it can't delete a running instance. I have
not been able to reproduce it specifically but there was a case which
was being missed which was that if the instance is in `UNKNOWN` state
which it can be but very briefly - that can result in this issue.


## Solution

Make sure if instance is not stopped, we attempt to force stop it before
attempting deletion and if it fails (which it can if the instance is
already stopped, we just silently log it) and let deletion go through.
DeltaFile
+11-6src/middlewared/middlewared/plugins/virt/instance.py
+0-4src/middlewared/middlewared/test/integration/assets/virt.py
+11-102 files

FreeNAS/freenas 62bba9csrc/middlewared/middlewared/api/v25_04_0 virt_instance.py virt_volume.py

Fix discrepancy between 2510 and 2504 virt pydantic models
DeltaFile
+1-1src/middlewared/middlewared/api/v25_04_0/virt_instance.py
+1-1src/middlewared/middlewared/api/v25_04_0/virt_volume.py
+2-22 files

FreeNAS/freenas ff762efsrc/middlewared/middlewared/plugins/virt instance.py, src/middlewared/middlewared/test/integration/assets virt.py

Make sure virt instance is stopped before attempting to delete it
DeltaFile
+11-6src/middlewared/middlewared/plugins/virt/instance.py
+0-4src/middlewared/middlewared/test/integration/assets/virt.py
+11-102 files

FreeNAS/freenas d00385bsrc/middlewared/middlewared/api/v25_10_0 virt_device.py

Get pydantic changes to 25.10
DeltaFile
+10-0src/middlewared/middlewared/api/v25_10_0/virt_device.py
+10-01 files

FreeNAS/freenas 487d6d9src/middlewared/middlewared/api/v25_04_0 virt_device.py, src/middlewared/middlewared/plugins/virt instance_device.py

Add endpoint to allow booting from specific disk in virt VM
DeltaFile
+51-4src/middlewared/middlewared/plugins/virt/instance_device.py
+10-0src/middlewared/middlewared/api/v25_04_0/virt_device.py
+61-42 files

FreeNAS/freenas 1574b3f

Empty commit to create PR on github.

You should reset it
DeltaFile
+0-00 files

FreeNAS/freenas a510b66src/middlewared/middlewared/api/v25_10_0 pool.py

NAS-134689 / 25.10 / Do not allow users to create pool with whitespaces in name (#15984)

## Context

We had added validation earlier to not allow users to set a pool for
incus which has whitespaces in it's name because incus is not able to
handle pool names which have whitespaces in it. Now we are adding
changes to not allow user to create/import a pool with a name which
contains whitespaces.
DeltaFile
+21-5src/middlewared/middlewared/api/v25_10_0/pool.py
+21-51 files

FreeNAS/freenas 2014409src/middlewared/middlewared/plugins/virt global.py utils.py, tests/api2 test_virt_storage_pool.py

NAS-134688 / 25.10 / Add support for multiple storage pools to incus (by anodos325) (#15986)

This commit adds the ability for the administrator to configure multiple
storage pools for incus on TrueNAS. This is required in order to give
administrators flexibility about where to store instances and the
ability to shift them to different storage pools.

Due to the complexity of potential incus instance configurations,
failure to initialize any incus storage pool is treated from the
standpoint of middleware as a global failure to properly set up the virt
plugin.

Since it touches all areas of the virt plugin APIs it is a pre-requisite
for developing backup / restore and snapshot endpoints.

The middleware virt plugin has been changed in the following ways:

* virt.global.config / virt.global.update -- these methods now have a
storage_pools key, that provides a list of ZFS pools that are configured

    [55 lines not shown]
DeltaFile
+250-93src/middlewared/middlewared/plugins/virt/global.py
+191-0tests/api2/test_virt_storage_pool.py
+70-4src/middlewared/middlewared/plugins/virt/utils.py
+45-22src/middlewared/middlewared/plugins/virt/volume.py
+40-0tests/unit/test_virt_utils.py
+24-12src/middlewared/middlewared/plugins/virt/attachments.py
+620-13114 files not shown
+802-15020 files

FreeNAS/freenas b149520src/middlewared/middlewared/pytest/unit/plugins/virt test_virt_instance_env.py

Fix
DeltaFile
+13-1src/middlewared/middlewared/pytest/unit/plugins/virt/test_virt_instance_env.py
+13-11 files

FreeNAS/freenas aeab2bcsrc/middlewared/middlewared/api/v25_10_0 pool_snapshot.py

more specific annotation for PoolSnapshotEntry.holds
DeltaFile
+5-1src/middlewared/middlewared/api/v25_10_0/pool_snapshot.py
+5-11 files

FreeNAS/freenas aa26a7bsrc/middlewared/middlewared/alembic/versions/25.10 2025-03-13_20-14_merge-migration-incus-storage-pools.py, src/middlewared/middlewared/api/v25_10_0 virt_volume.py virt_instance.py

Add merge migration and API updates
DeltaFile
+24-0src/middlewared/middlewared/alembic/versions/25.10/2025-03-13_20-14_merge-migration-incus-storage-pools.py
+13-0src/middlewared/middlewared/api/v25_10_0/virt_volume.py
+8-0src/middlewared/middlewared/api/v25_10_0/virt_instance.py
+7-0src/middlewared/middlewared/api/v25_10_0/virt_device.py
+6-0src/middlewared/middlewared/api/v25_10_0/virt_global.py
+58-05 files

FreeNAS/freenas 89e7103src/middlewared/middlewared/api/v25_10_0 pool_snapshot.py

allow query and get_instance to return `holds`
DeltaFile
+9-3src/middlewared/middlewared/api/v25_10_0/pool_snapshot.py
+9-31 files

FreeNAS/freenas e9868ebsrc/middlewared/middlewared/plugins/virt global.py utils.py, tests/api2 test_virt_storage_pool.py

Add support for multiple storage pools to incus

This commit adds the ability for the administrator to configure
multiple storage pools for incus on TrueNAS. This is required in
order to give administrators flexibility about where to store
instances and the ability to shift them to different storage pools.

Due to the complexity of potential incus instance configurations,
failure to initialize any incus storage pool is treated from
the standpoint of middleware as a global failure to properly set up
the virt plugin.

Since it touches all areas of the virt plugin APIs it is a
pre-requisite for developing backup / restore and snapshot
endpoints.

The middleware virt plugin has been changed in the following ways:

* virt.global.config / virt.global.update -- these methods now have

    [58 lines not shown]
DeltaFile
+250-93src/middlewared/middlewared/plugins/virt/global.py
+191-0tests/api2/test_virt_storage_pool.py
+70-4src/middlewared/middlewared/plugins/virt/utils.py
+45-22src/middlewared/middlewared/plugins/virt/volume.py
+40-0tests/unit/test_virt_utils.py
+24-12src/middlewared/middlewared/plugins/virt/attachments.py
+620-1318 files not shown
+731-14914 files

FreeNAS/freenas 32d450esrc/middlewared/middlewared/plugins/virt global.py utils.py, tests/api2 test_virt_storage_pool.py

NAS-134688 / 25.04.0 / Add support for multiple storage pools to incus (#15948)

This commit adds the ability for the administrator to configure multiple
storage pools for incus on TrueNAS. This is required in order to give
administrators flexibility about where to store instances and the
ability to shift them to different storage pools.

Due to the complexity of potential incus instance configurations,
failure to initialize any incus storage pool is treated from the
standpoint of middleware as a global failure to properly set up the virt
plugin.

Since it touches all areas of the virt plugin APIs it is a pre-requisite
for developing backup / restore and snapshot endpoints.

The middleware virt plugin has been changed in the following ways:

* virt.global.config / virt.global.update -- these methods now have a
storage_pools key, that provides a list of ZFS pools that are configured

    [48 lines not shown]
DeltaFile
+250-93src/middlewared/middlewared/plugins/virt/global.py
+191-0tests/api2/test_virt_storage_pool.py
+70-4src/middlewared/middlewared/plugins/virt/utils.py
+45-22src/middlewared/middlewared/plugins/virt/volume.py
+40-0tests/unit/test_virt_utils.py
+24-12src/middlewared/middlewared/plugins/virt/attachments.py
+620-1318 files not shown
+731-14914 files

FreeNAS/freenas 27d2e33src/middlewared/middlewared/api/v25_10_0 pool_snapshot.py

add LOCAL to PoolSnapshotEntryPropertyFields.source
DeltaFile
+1-1src/middlewared/middlewared/api/v25_10_0/pool_snapshot.py
+1-11 files

FreeNAS/freenas 6b56863src/middlewared/middlewared/api/v25_04_0 virt_instance.py

NAS-134733 / 25.04.0 / Mark raw attribute in virt instance as secret in the API (by Qubad786) (#15985)

DeltaFile
+1-1src/middlewared/middlewared/api/v25_04_0/virt_instance.py
+1-11 files

FreeNAS/freenas 45e64aasrc/middlewared/middlewared/api/v25_04_0 virt_instance.py, src/middlewared/middlewared/api/v25_10_0 virt_instance.py

NAS-134733 / 25.10 / Mark raw attribute in virt instance as secret in the API (#15983)

## Context

`raw` attribute can contain VNC password configuration so we should mark
it as a secret in the pydantic model.
DeltaFile
+1-1src/middlewared/middlewared/api/v25_04_0/virt_instance.py
+1-1src/middlewared/middlewared/api/v25_10_0/virt_instance.py
+2-22 files

FreeNAS/freenas 1488518src/middlewared/middlewared/plugins/pool_ snapshot.py, src/middlewared/middlewared/plugins/zfs_ snapshot.py

transfer role_separate_delete
DeltaFile
+0-1src/middlewared/middlewared/plugins/zfs_/snapshot.py
+1-0src/middlewared/middlewared/plugins/pool_/snapshot.py
+1-12 files

FreeNAS/freenas 1904629src/middlewared/middlewared/plugins/pool_ snapshot.py, src/middlewared/middlewared/plugins/zfs_ snapshot.py

transfer cli_namespace
DeltaFile
+1-0src/middlewared/middlewared/plugins/pool_/snapshot.py
+0-1src/middlewared/middlewared/plugins/zfs_/snapshot.py
+1-12 files

FreeNAS/freenas 555ea46src/middlewared/middlewared/api/v25_10_0 pool.py

Do not allow users to create pool with whitespaces in name
DeltaFile
+21-5src/middlewared/middlewared/api/v25_10_0/pool.py
+21-51 files

FreeNAS/freenas dc0e0aesrc/middlewared/middlewared/plugins/zfs_ snapshot.py

don't use `do_` prefix in private plugin
DeltaFile
+3-3src/middlewared/middlewared/plugins/zfs_/snapshot.py
+3-31 files

FreeNAS/freenas 6fd572fdocs/source/middleware process_pool.rst, src/middlewared/middlewared worker.py

some cleanup
DeltaFile
+21-0src/middlewared/middlewared/plugins/pool_/snapshot.py
+7-6src/middlewared/middlewared/worker.py
+4-4docs/source/middleware/process_pool.rst
+3-0src/middlewared/middlewared/api/v25_10_0/pool_snapshot.py
+1-1src/middlewared/middlewared/plugins/zfs_/snapshot.py
+1-1src/middlewared/middlewared/plugins/zfs_/snapshot_actions.py
+37-126 files

FreeNAS/freenas 5a5d721src/middlewared/middlewared/api/v25_10_0 pool_snapshot.py, src/middlewared/middlewared/plugins/pool_ snapshot.py

define schema
DeltaFile
+143-3src/middlewared/middlewared/api/v25_10_0/pool_snapshot.py
+1-36src/middlewared/middlewared/plugins/zfs_/snapshot_actions.py
+0-33src/middlewared/middlewared/plugins/zfs_/snapshot.py
+18-1src/middlewared/middlewared/plugins/pool_/snapshot.py
+162-734 files

FreeNAS/freenas 54bebb6src/middlewared/middlewared/api/v25_10_0 virt_instance.py

Get pydantic changes to 25.10
DeltaFile
+1-1src/middlewared/middlewared/api/v25_10_0/virt_instance.py
+1-11 files

FreeNAS/freenas f939ecbsrc/middlewared/middlewared/api/v25_04_0 virt_instance.py

Mark raw attribute as a secret in the API
DeltaFile
+1-1src/middlewared/middlewared/api/v25_04_0/virt_instance.py
+1-11 files

FreeNAS/freenas fa9c649src/middlewared/middlewared/plugins/virt global.py utils.py, tests/api2 test_virt_storage_pool.py

Add support for multiple storage pools to incus

This commit adds the ability for the administrator to configure
multiple storage pools for incus on TrueNAS. This is required in
order to give administrators flexibility about where to store
instances and the ability to shift them to different storage pools.

Due to the complexity of potential incus instance configurations,
failure to initialize any incus storage pool is treated from
the standpoint of middleware as a global failure to properly set up
the virt plugin.

Since it touches all areas of the virt plugin APIs it is a
pre-requisite for developing backup / restore and snapshot
endpoints.

The middleware virt plugin has been changed in the following ways:

* virt.global.config / virt.global.update -- these methods now have

    [56 lines not shown]
DeltaFile
+250-93src/middlewared/middlewared/plugins/virt/global.py
+191-0tests/api2/test_virt_storage_pool.py
+70-4src/middlewared/middlewared/plugins/virt/utils.py
+45-23src/middlewared/middlewared/plugins/virt/volume.py
+40-0tests/unit/test_virt_utils.py
+24-12src/middlewared/middlewared/plugins/virt/attachments.py
+620-1328 files not shown
+731-15014 files

FreeNAS/freenas c60c280src/middlewared/middlewared/plugins/virt global.py

Fix validation
DeltaFile
+9-9src/middlewared/middlewared/plugins/virt/global.py
+9-91 files

FreeNAS/freenas 4023dc3src/middlewared/middlewared/plugins/virt global.py utils.py, tests/api2 test_virt_storage_pool.py

Add support for multiple storage pools to incus

This commit adds the ability for the administrator to configure
multiple storage pools for incus on TrueNAS. This is required in
order to give administrators flexibility about where to store
instances and the ability to shift them to different storage pools.

Due to the complexity of potential incus instance configurations,
failure to initialize any incus storage pool is treated from
the standpoint of middleware as a global failure to properly set up
the virt plugin.

Since it touches all areas of the virt plugin APIs it is a
pre-requisite for developing backup / restore and snapshot
endpoints.

The middleware virt plugin has been changed in the following ways:

* virt.global.config / virt.global.update -- these methods now have

    [56 lines not shown]
DeltaFile
+250-93src/middlewared/middlewared/plugins/virt/global.py
+191-0tests/api2/test_virt_storage_pool.py
+70-4src/middlewared/middlewared/plugins/virt/utils.py
+45-23src/middlewared/middlewared/plugins/virt/volume.py
+40-0tests/unit/test_virt_utils.py
+24-12src/middlewared/middlewared/plugins/virt/attachments.py
+620-1328 files not shown
+731-15014 files