The bug in 25.04.2 that causes the Virtual Machines page to error with “Cannot Retrieve Response” has been fixed for a future 25.04.2.1 release already, but the fix can be easily applied to a 25.04.2 installation.
WARNING: ONLY USE THIS ON 25.04.2!
In the shell,
switch to root, if you are not root already sudo su
remove the readonly protection on /usr zfs set readonly=off "$(zfs list -H -o name /usr)"
use the following command to apply this patch to fix this issue (this will backup the modified files in place with a .orig suffix) curl https://patch-diff.githubusercontent.com/raw/truenas/middleware/pull/16843.patch | patch -b -p4 -d/usr/lib/python3/dist-packages/middlewared
re-apply the readonly protection zfs set readonly=on "$(zfs list -H -o name /usr)"
restart the middlewared service middlewared restart
After a few minutes the middlewared should restart, and the issue should be fixed.
Dang…although logged in to shell as root, the zfs set command fails with:
“cannot mount ‘boot-pool/ROOT/25.04.2/usr’: Read-only file system
property may be set but unable to remount filesystem”
As a result, the second, curl command fails with:
“File api/v25_04_2/vm_device.py is read-only; trying to patch anyway
patch: **** Can’t create temporary file api/v25_04_2/vm_device.py.ohVfnau : Read-only file system”
EDIT: Solved!!
The read only problem solved by first ‘systemd-sysext unmerge’ the nvidia module, then run “install-dev-tools” or “/usr/local/libexec/disable-rootfs-protection”.
Then the above commands worked…and now I have access to the VM GUI