When reboot in VM guest, truenas will not reboot this vm!

impkt13

Dabbler
Joined
Aug 26, 2022
Messages
11
I moved from freebsd13.1 to truenas 13. My zfs pool working good, but vm have some bug!

When i remote reboot in a guest vm(openwrt os, my router), this vm not reboot normaly, while i’m working remote, so i lost my internet! So bad!


What a bad luck!!
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
How did you create this VM while in FreeBSD? You'll probably need to recreate it in TrueNAS so the system is aware of it.
 

impkt13

Dabbler
Joined
Aug 26, 2022
Messages
11
How did you create this VM while in FreeBSD? You'll probably need to recreate it in TrueNAS so the system is aware of it.
I don’t think so ! First i dd openwrt to img in freebsd13, then i dd img in truenas to the new zvol, i think this must be a bug, after discuss with my frends, he seem meet the same bug, and report it. But ix eng think it’s a libvirtd’s bug and closed this bug report. I do not know bhyve how to work in truenas, i found libvirtd. Before i just only use bhyve admin my vm.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Which OpenWRT image did you use originally?

BTW, the TrueNAS middleware can only operate with bhyve and not libvirtd. The bhyve implementation can only operate x86_64 images booting via UEFI or GRUB. (GRUB requires additional steps.)
 

impkt13

Dabbler
Joined
Aug 26, 2022
Messages
11
Which OpenWRT image did you use originally?

BTW, the TrueNAS middleware can only operate with bhyve and not libvirtd. The bhyve implementation can only operate x86_64 images booting via UEFI or GRUB. (GRUB requires additional steps.)
I moved openwrt vm from freebsd 13.1, and the img i used is originally. Grub bootloader.
 

impkt13

Dabbler
Joined
Aug 26, 2022
Messages
11
Which OpenWRT image did you use originally?

BTW, the TrueNAS middleware can only operate with bhyve and not libvirtd. The bhyve implementation can only operate x86_64 images booting via UEFI or GRUB. (GRUB requires additional steps.)
ps ax |grep libvirt
in truenas you will be see libvirtd! I don’t know why
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Grub bootloader.

That explains it. My bhyve VMs using GRUB also don't auto-restart if I reboot from inside the VM. This is because of the dependency on grub-bhyve to read grub.cfg outside the VM to restart. For my GRUB VMs, I have to use API commands to shut them down from the host. See https://www.truenas.com/community/threads/backup-bhyve-windows-vm.85705/.

ps ax |grep libvirt
in truenas you will be see libvirtd! I don’t know why

This is how the middleware interacts with bhyve. It's not intended for end-user service.
 

impkt13

Dabbler
Joined
Aug 26, 2022
Messages
11
That explains it. My bhyve VMs using GRUB also don't auto-restart if I reboot from inside the VM. This is because of the dependency on grub-bhyve to read grub.cfg outside the VM to restart. For my GRUB VMs, I have to use API commands to shut them down from the host. See https://www.truenas.com/community/threads/backup-bhyve-windows-vm.85705/.



This is how the middleware interacts with bhyve. It's not intended for end-user service.
reboot in vm don’t autorestart is not happened every time. So mybe your explain right. I still think it’s the middleware libvirtd’s bug!
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
I still think it’s the middleware libvirtd’s bug!

I don't think so, since the middleware API calls midclt call vm.start and midclt call vm.stop both work, and account for the quirks of grub-bhyve. Please use API calls in the future to restart your GRUB VM, instead of trying to restart from within the GRUB VM.
 

impkt13

Dabbler
Joined
Aug 26, 2022
Messages
11
I don't think so, since the middleware API calls midclt call vm.start and midclt call vm.stop both work, and account for the quirks of grub-bhyve. Please use API calls in the future to restart your GRUB VM, instead of trying to restart from within the GRUB VM.
Thanks for your help.
 
Top