Virtual Machine not restarting but shutting down

toca.cals

Cadet
Joined
Sep 21, 2023
Messages
4
Hello all!

I'm having a issue when I reboot my VMs. The VMs just shutdown and doesn't restart.

Any sugestion about this issue?

------------------
[/etc]# cat version
TrueNAS-13.0-U5.3 (3dd62f69ac)

# uname -a
FreeBSD truenas 13.1-RELEASE-p7 FreeBSD 13.1-RELEASE-p7 n245428-4dfb91682c1 TRUENAS amd64
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Guest OS and full configuration of your VMs, please ...
 

toca.cals

Cadet
Joined
Sep 21, 2023
Messages
4
Hello Patrick!

Happens with all OS, with Linux sometimes works.

Best regards.
 

Attachments

  • midclt.txt
    12 KB · Views: 69

toca.cals

Cadet
Joined
Sep 21, 2023
Messages
4
# midclt call vm.query | jq '[.[] | select(.id == 16) ]'
[
{
"id": 16,
"name": "MSWIN_AD",
"description": "AD e DNS Windows 2022",
"vcpus": 1,
"memory": 4096,
"autostart": false,
"time": "UTC",
"grubconfig": null,
"bootloader": "UEFI",
"cores": 4,
"threads": 1,
"shutdown_timeout": 90,
"devices": [
{
"id": 179,
"dtype": "NIC",
"attributes": {
"type": "VIRTIO",
"mac": "00:a0:98:6b:9b:48",
"nic_attach": "bridge0"
},
"order": 1003,
"vm": 16
},
{
"id": 180,
"dtype": "DISK",
"attributes": {
"path": "/dev/zvol/poolmain/vmds/MSWIN_AD-ohdfmf",
"type": "VIRTIO",
"physical_sectorsize": null,
"logical_sectorsize": null
},
"order": 1001,
"vm": 16
},
{
"id": 181,
"dtype": "CDROM",
"attributes": {
"path": "/mnt/poolmain/vmds/ISO/WindowsServer2022-LTSC_21H2-Build_20348.1006.iso"
},
"order": 1000,
"vm": 16
},
{
"id": 182,
"dtype": "VNC",
"attributes": {
"vnc_port": 18838,
"wait": true,
"vnc_resolution": "1024x768",
"vnc_bind": "192.168.111.112",
"vnc_password": "",
"vnc_web": true
},
"order": 1002,
"vm": 16
},
{
"id": 187,
"dtype": "CDROM",
"attributes": {
"path": "/mnt/poolmain/vmds/ISO/virtio-win-0.1.240.iso"
},
"order": 1000,
"vm": 16
}
],
"status": {
"state": "RUNNING",
"pid": 5577,
"domain_state": "RUNNING"

}
}
]
=====================
# ps -fp 5577
PID TT STAT TIME COMMAND

# ps -aux | grep bhyv
root 8539 0.0 0.0 12924 2512 0 S+ 19:25 0:00.00 grep bhyv
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You have autostart set to false and wait for VNC set to true. I would change both of those settings.
 

toca.cals

Cadet
Joined
Sep 21, 2023
Messages
4
I think the problem is different
# midclt call vm.query | jq '[.[] | select(.id == 16) | .name, .status.state, .status.pid]'
[
"MSWIN_AD",
"RUNNING",
11695
]

# ps -fp 11695
PID TT STAT TIME COMMAND



# midclt call vm.query | jq '[.[] | select(.id == 16) ]'
[
{
"id": 16,
"name": "MSWIN_AD",
"description": "AD e DNS Windows 2022",
"vcpus": 1,
"memory": 4096,
"autostart": true,
"time": "UTC",
"grubconfig": null,
"bootloader": "UEFI",
"cores": 4,
"threads": 1,
"shutdown_timeout": 90,
"devices": [
{
"id": 179,
"dtype": "NIC",
"attributes": {
"type": "VIRTIO",
"mac": "00:a0:98:6b:9b:48",
"nic_attach": "bridge0"
},
"order": 1003,
"vm": 16
},
{
"id": 180,
"dtype": "DISK",
"attributes": {
"path": "/dev/zvol/poolmain/vmds/MSWIN_AD-ohdfmf",
"type": "VIRTIO",
"physical_sectorsize": null,
"logical_sectorsize": null
},
"order": 1001,
"vm": 16
},
{
"id": 181,
"dtype": "CDROM",
"attributes": {
"path": "/mnt/poolmain/vmds/ISO/WindowsServer2022-LTSC_21H2-Build_20348.1006.iso"
},
"order": 1000,
"vm": 16
},
{
"id": 182,
"dtype": "VNC",
"attributes": {
"vnc_port": 18838,
"wait": false,
"vnc_resolution": "1024x768",
"vnc_bind": "192.168.111.112",
"vnc_password": "",
"vnc_web": true
},
"order": 1002,
"vm": 16
},
{
"id": 187,
"dtype": "CDROM",
"attributes": {
"path": "/mnt/poolmain/vmds/ISO/virtio-win-0.1.240.iso"
},
"order": 1000,
"vm": 16
}
],
"status": {
"state": "RUNNING",
"pid": 11695,
"domain_state": "RUNNING"
}
}
]
 
Top