Truenas Scale VM not starting

strikermed

Dabbler
Joined
Mar 22, 2017
Messages
29
I'm trying to get my VM on Truenas Scale up and running. I was on TrueNAS-SCALE-22.12.0, and this issue occurred after a power outage. I upgraded to TrueNAS-SCALE-22.12.1 hoping it would correct the issue, but it did not.

My Windows Vm will not start and provides this error when it doesn't:

[EFAULT] 'ericserverssd' VM is suspended and can only be resumed/powered off
Error: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/middlewared/main.py", line 196, in call_method result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self) File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1335, in _call return await methodobj(*prepared_call.args) File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1318, in nf return await func(*args, **kwargs) File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1186, in nf res = await f(*args, **kwargs) File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/vm_lifecycle.py", line 37, in start raise CallError(f'{vm["name"]!r} VM is suspended and can only be resumed/powered off') middlewared.service_exception.CallError: [EFAULT] 'ericserverssd' VM is suspended and can only be resumed/powered off
Am I reading the error correctly, in that I just need to alter the script, or config file that reports the last state of the VM to be off rather than suspended? I don't know which file that would be, but that error seems like it's saying it's expecting a suspended state, and that's not the case...



I've attached the logs for the VM.
 

Basserra

Dabbler
Joined
Sep 21, 2020
Messages
28
I'm just talking out of my A$$ with this one, but maybe there is a stuck lock file after the power loss? I've had file servers and databases hang due to a stuck lock file or cache file after power loss or disk full/fail. Can you try to see if virsh is reporting the status too?
virsh -c "qemu+unix:///system?socket=/run/truenas_libvirt/libvirt-sock" list --all to start
Otherwise, I have read that some people have needed to reinstall TN when updates fail or don't correct an issue with drivers.

P.S. Also you could try to make a new VM and manually choose the stuck VM's disk to see if you can recover it. But you still may need to force the stuck VM into a poweroff state.
 
Last edited:

strikermed

Dabbler
Joined
Mar 22, 2017
Messages
29
I'm just talking out of my A$$ with this one, but maybe there is a stuck lock file after the power loss? I've had file servers and databases hang due to a stuck lock file or cache file after power loss or disk full/fail. Can you try to see if virsh is reporting the status too?
virsh -c "qemu+unix:///system?socket=/run/truenas_libvirt/libvirt-sock" list --all to start
Otherwise, I have read that some people have needed to reinstall TN when updates fail or don't correct an issue with drivers.

P.S. Also you could try to make a new VM and manually choose the stuck VM's disk to see if you can recover it. But you still may need to force the stuck VM into a poweroff state.
Thanks for your response, and I apologize for my late response. The VM I'm trying to start has a state of "paused" when I run that command you provided.

Do you know how to force the VM into a power off state or "shut off" state?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Expand the VM.
VMRunningOptionsSCALE.png

Click the Power Off button.
 

strikermed

Dabbler
Joined
Mar 22, 2017
Messages
29
Expand the VM.
VMRunningOptionsSCALE.png

Click the Power Off button.
Thanks for your reply, I should have clarified... The VM in the GUI is reporting in a non running state, and upon trying to run it I receive an error in which I included in the original post along with the logs.
 

Basserra

Dabbler
Joined
Sep 21, 2020
Messages
28
virsh -c "qemu+unix:///system?socket=/run/truenas_libvirt/libvirt-sock" help destroy to start
However, I cannot recommend this as I can't know what will happen to your TrueNAS install. Also the VM's disk could become even more corrupted. If you force something in an appliance that should be handled by its software, you would most likely damage it. For example, you would then need to enter the middlewared database and make further edits there, which would require a "Here there be dragons" warning. I don't have experience with any of this. If your VM is vital, you should not force it. You might try making a new boot-environment(fresh config) or new install and again, make a new VM using the old disk then backup/recover it. If you do manage to recover it or drop the problem, but still have the VM stuck and can't delete it, I would file a bug report.
 
Top