bhyve [SOLVED ]VM bhyve suddenly stopped working

Hi,

My Byhve VM suddenly won't boot. I use vm-bhyve. It worked fine until yesterday. I upgraded my FreeBSD STABLE-14 to latest src, may be it is related ?

The config :

Code:
loader="grub"
grub_run_partition="2"
cpu=2
memory=4096M
network0_type="virtio-net"
network0_switch="public"
disk0_type="virtio-blk"
disk0_name="disk0.img"
uuid="f878c150-de67-11ec-8816-d05099c11279"
network0_mac="58:9c:fc:0d:84:62"
disk1_name="disk1.img"
disk1_type="virtio-blk"
disk1_dev="file"
disk2_name="disk2.img"
disk2_type="virtio-blk"
disk_dev="file"
bhyve_options="-wA"

The log :

Code:
Oct 04 08:43:27: initialising
Oct 04 08:43:27:  [loader: grub]
Oct 04 08:43:27:  [cpu: 2]
Oct 04 08:43:27:  [memory: 4096M]
Oct 04 08:43:27:  [hostbridge: standard]
Oct 04 08:43:27:  [com ports: com1]
Oct 04 08:43:27:  [uuid: f878c150-de67-11ec-8816-d05099c11279]
Oct 04 08:43:27:  [debug mode: no]
Oct 04 08:43:27:  [primary disk: disk0.img]
Oct 04 08:43:27:  [primary disk dev: file]
Oct 04 08:43:27: initialising network device tap0
Oct 04 08:43:27: adding tap0 -> vm-public (public addm)
Oct 04 08:43:27: bring up tap0 -> vm-public (public addm)
Oct 04 08:43:28: booting
Oct 04 08:43:28: create file /vms/valinor/device.map
Oct 04 08:43:28:  -> (hd0) /vms/valinor/disk0.img
Oct 04 08:43:28:  -> (hd1) /vms/valinor/disk1.img
Oct 04 08:43:28:  -> (hd2) /vms/valinor/disk2.img
Oct 04 08:43:28: /usr/local/sbin/grub-bhyve -c /dev/nmdm-valinor.1A -m /vms/valinor/device.map -M 4096M -r hd0,2 valinor
Oct 04 08:43:28: fatal; loader returned error 1
Oct 04 08:43:28: destroying network device tap0
Oct 04 08:43:28: stopped

Any idea how to debug this ?

TIA,

Regards,

Xavier
 
Any idea how to debug this ?
Add to the VM conf vm(8) "debug="yes", perhaps this gives more info.
Code:
     debug              If this is set to yes, all output from the bhyve(8)
                        process will be written to ${vm_dir}/guest/bhyve.log.
                        This is useful for debugging purposes as it allows you
                        to see any error messages that are being produced by
                        bhyve(8) itself.
 
Add to the VM conf vm(8) "debug="yes", perhaps this gives more info.
Code:
     debug              If this is set to yes, all output from the bhyve(8)
                        process will be written to ${vm_dir}/guest/bhyve.log.
                        This is useful for debugging purposes as it allows you
                        to see any error messages that are being produced by
                        bhyve(8) itself.
Hi,
That's actually the log I posted
 
Hi,
That's actually the log I posted
Are you sure?
It looks like you posted vm-bhyve.log but when you add debug="yes" to your VM config, then an additional file bhyve.log is created.

For example, my vm-bhyve.log starts with this:
Code:
Sep 03 17:13:16: initialising
Sep 03 17:13:16:  [loader: uefi]
Sep 03 17:13:16:  [cpu: 4,sockets=1,cores=4,threads=1]
Sep 03 17:13:16:  [memory: 16G]
Sep 03 17:13:16:  [hostbridge: standard]
Sep 03 17:13:16:  [com ports: com1]
... which is very similar to your file

Whereas bhyve.log will be mostly empty apart from maybe 1 or 2 lines with an error message like:
Code:
Unhandled memory access to 0x81013814c
Failed to emulate instruction sequence [ 418b0289024883c408c333c0488974 ] at 0xfffff8011ddf6684
Note lack of timestamps at the beginning of each line.
 
Hi,
I added debug="yes" to my config file, but there is no bhyve.log file :
Code:
[root@numenor ~]# locate bhyve.log
/vms/valinor/vm-bhyve.log

I can see the line
Code:
Oct 06 17:30:12:  [debug mode: yes]
in vm-bhve.log

Answering to SirDice, I'm in stable/14 branch
 
Answering to SirDice, I'm in stable/14 branch
Alright, just checking. You wouldn't be the first that accidentally upgraded to -CURRENT 😁

It also narrows down the possible changes that may have happened to bhyve(8) and it's kernel modules.

Oct 04 08:43:28: fatal; loader returned error 1
Loader failed, which is Grub (loader="grub").

You upgraded the OS yesterday, did you also update your ports/packages perhaps? Is sysutils/grub2-bhyve still installed? Maybe it got removed during the update or autoremove.
 
Alright, just checking. You wouldn't be the first that accidentally upgraded to -CURRENT 😁

It also narrows down the possible changes that may have happened to bhyve(8) and it's kernel modules.


Loader failed, which is Grub (loader="grub").

You upgraded the OS yesterday, did you also update your ports/packages perhaps? Is sysutils/grub2-bhyve still installed? Maybe it got removed during the update or autoremove.
You got it. For some reason, sysutils/grub2-bhyve was broken. Reinstalling it fixed the problem. Thanks !
Regards,
Xavier
 
Back
Top