VM cannot be started

Hi guys, I woke up today to find my Lubuntu VM that has been up for a month at a “stopped” state. In my TrueNAS Scale 23.10.2, when I click start, I get this error: “VM is suspended and can only be resumed/powered off”. I restarted Truenas Scale and when it booted up again, the VM showed a “running” state. If I connect to it from virt-viewer, I can see Lubuntu’s boot logo. However it eventually freezes and the VM goes back to a “stopped” state. I get the same error if I click start. I can still connect to it from virt-viewer to see the frozen Lubuntu boot logo.

Does anyone have any idea what is going on ? I would really like to get the VM back up and running asap. Really appreciate everyone’s time.

It turns out Lubuntu boot was freezing when it was trying to mount my data zvol. It also wouldn’t boot into recovery mode. I should have booted into a live disk to edit fstab and comment out the mount but instead I deleted the data zvol from the vm. After doing that, the data zvol disappeared completely from the data pool. I thought that deleting the data zvol from the vm would only disconnect it from the vm but I guess I was wrong. I have a few questions now after this experience.

  1. How do I disconnect a zvol from a vm without deleting the zvol from the pool ?
  2. I do not have any snapshots of the data pool that had the deleted data zvol. Is there anyway to get the data zvol back ?
  3. What could have caused my Lubuntu vm to freeze on boot when trying to mount the data zvol ? TrueNAS Scale is reporting the data pool as healthy. The vm has been working for a month now with many restarts. The data zvol was 100% of the data pool capacity (I realize now that that was a bad idea) but only 61% of the space had been used. Initially I thought maybe it got filled to 99% which is what crashed the vm and prevented it to boot but that is not the case.

Thank you in advance

Under Virtualization, the VM in question, there is a “Devices” link. On that page is all your virtual machines devices like disks. To remove the disk from the VM, click the 3 dots and first click details to determine which one, then, click the 3 dots and delete. The virtual disk will no longer show up in the VM but will still be there (the zvol).

The only way to get it back since you deleted the zvol and have no snapshots would be a backup of some other sort.

As far as what caused it, who knows. Millions of possible reasons, would need error/other messages from the console.

Thanks for your reply ! I actually did exactly what you said to remove the zvol from the vm. For some reason the zvol also disappeared from the pool. Maybe I did something wrong or maybe it is a bug.

I will just have to recreate my data zvol again and turn on snapshots in case this happens again.

I don’t know what version you are on, but when you do that on Cobia at least, it asks you something like delete zvol with a checkbox. Uncheck it if it’s checked and it won’t delete it.