HOWTO: Fix Virtual Machines: Cannot Retrieve Response in 25.04.2

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,

  1. switch to root, if you are not root already
    sudo su
  2. remove the readonly protection on /usr
    zfs set readonly=off "$(zfs list -H -o name /usr)"
  3. 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
  4. re-apply the readonly protection
    zfs set readonly=on "$(zfs list -H -o name /usr)"
  5. restart the middlewared
    service middlewared restart

After a few minutes the middlewared should restart, and the issue should be fixed.

Ahhh, hello old friends…

(FWIW, this technique can be used to apply any single commit middlewared patch)

10 Likes

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!!

  1. 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”.
  2. Then the above commands worked…and now I have access to the VM GUI :slight_smile:
3 Likes

Excellent. My VM are alive :joy:. Thanks a lot

1 Like

Do we have 25.04.2.1 in release yet or is it still pending? I can’t see it to be available.

Not yet.

1 Like

Yet.

1 Like

The problem has not been solved for me. Even after upgrading from 25.04.2 to 25.04.2.1, I still receive the error:

My old VMs are still showing on the “Container” page.

I tried to create two VMs as a test, but they are not showing up on the “Virtual Machines” page. I can see only the zvol drive in dataset

Hello, anyone can help me to figure out the issue?