bhyve Problem starting a machine with cbsd

hello, I already have a virtualized machine with a cbsd. I want to move this virtual machine to freebsd installed on proxmox. I transfer the .img file to my freebsd machine in proxmox with the cbsd bexport and cbsd bimport commands. However, when I run the virtual machine I transferred, the virtual machine freezes completely. Proxmox gives an internal-error error for the machine.

My old freebsd machine has version 12.2. My new machine has version 13. But I don't think the problem is the version. Because I tried again by installing another machine with version 12.2 and got the same result.

The strange thing is, when I create a new machine with the cbsd bconstruct-tui command on my freebsd machine that I set up on proxmox, the machine runs smoothly. However, the virtual machine that I moved from a different data center does not work and gives an internal-error error in proxmox.

When I put the virtual machine in debug mode, it gives the following output and the machine suddenly freezes.

Code:
GNU gdb (GDB) 11.1 [GDB v11.1 for FreeBSD]
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd13.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from env...
(No debugging symbols found in env)
Starting program: /usr/bin/env LIB9P_LOGGING=/usr/jails/jails-system/dev-fbsd-120-2-ent-1/cbsd_lib9p.log /usr/sbin/bhyve -c 1 -m 1073741824 -H -A -s 0,hostbridge -s 7,virtio-blk,/usr/jails/jails-data/dev-fbsd-120-2-ent-1-data/dsk1.vhd,sectorsize=512/4096 -s 5,ahci-cd,/usr/jails/src/iso/cbsd-iso-FreeBSD-13.0-RELEASE-amd64-disc1.iso,ro -s 4,virtio-net,tap2,mtu=1500,mac=00:xxx:01:00:53 -s 8,virtio-rnd -s 9,fbuf,tcp=127.0.0.1:5900,w=1280,h=720,password=aaaa -s 30,xhci,tablet -s 31,lpc -l com1,stdio -l bootrom,/usr/local/cbsd/upgrade/patch/efi.fd dev-fbsd-120-2-ent-1
process 10040 is executing new program: /usr/sbin/bhyve
[New LWP 100269 of process 10040]
[New LWP 100270 of process 10040]
[New LWP 100271 of process 10040]
[New LWP 100272 of process 10040]
[New LWP 100273 of process 10040]
[New LWP 100274 of process 10040]
[New LWP 100275 of process 10040]
[New LWP 100276 of process 10040]
[New LWP 100277 of process 10040]
[New LWP 100278 of process 10040]
[New LWP 100279 of process 10040]
[New LWP 100280 of process 10040]
[New LWP 100281 of process 10040]
[New LWP 100282 of process 10040]
[New LWP 100283 of process 10040]
[New LWP 100284 of process 10040]
[New LWP 100285 of process 10040]
fbuf frame buffer base: 0x843800000 [sz 16777216]
[New LWP 100286 of process 10040]
[Detaching after vfork from child process 10047]
[Detaching after vfork from child process 10048]
[Detaching after vfork from child process 10049]
[Detaching after vfork from child process 10050]
[Detaching after vfork from child process 10051]
[Detaching after vfork from child process 10052]
[Detaching after vfork from child process 10053]
[Detaching after vfork from child process 10054]
[Detaching after vfork from child process 10055]
[New LWP 100287 of process 10040]

any help would be greatly appreciated.
 
Can you post the bhyve commands in both cases for us to compare? If the bhyve command lines are identical, the VMs should behave identically.
You can try and use the bhyve command lines directly (without cbsd or poxmox) from the command line. Try the new bhyve command line on your old host and see if it freezes too.
 
hello, I put both working and non-working machine into debug mode in freebsd on proxmox and examined it. I saw that it launches it in debug mode with the following commands.


For example, the command of the virtual machine running smoothly on the freebsd machine on proxmox is as follows:

Code:
/usr/bin/nice -n 1 /usr/sbin/bhyve  -c 1 -m 1073741824 -H -A -U 37622ae0-689b-11ec-89a4-589cfc10ff80 -s 0,hostbridge   -s 4,virtio-blk,/usr/jails/jails-data/freebsd2-data/dsk1.vhd,sectorsize=512/4096   -s 2,ahci-cd,/usr/jails/src/iso/cbsd-iso-FreeBSD-13.0-RELEASE-amd64-disc1.iso,ro  -s 6,virtio-net,tap2,mtu=1500,mac=00:a0:98:0e:65:1c  -s 7,virtio-rnd  -s 9,fbuf,tcp=127.0.0.1:5902,w=1024,h=768,wait,password=cbsd -s 30,xhci,tablet  -s 31,lpc -l com1,stdio -l bootrom,/usr/local/cbsd/upgrade/patch/efi.fd   freebsd2

When I enter this command directly from the terminal, the test machine runs directly. There is no problem.

The following command belongs to the debug mode of the virtual machine I moved to the freebsd machine on proxmox:

Code:
/usr/bin/nice -n 1 /usr/sbin/bhyve  -c cpus=5,sockets=5,cores=1,threads=1 -m 5368709120 -H -A -s 0,hostbridge   -s 6,ahci-hd,/usr/jails/jails-data/dev-fbsd-120-2-ent-1-data/dsk1.vhd,sectorsize=512/4096   -s 5,ahci-cd,/usr/jails/src/iso/cbsd-iso-FreeBSD-13.0-RELEASE-amd64-disc1.iso,ro  -s 4,virtio-net,tap3,mtu=1500,mac=00:50:56:01:00:53  -s 8,virtio-rnd  -s 7,fbuf,tcp=127.0.0.1:5900,w=1280,h=720,password=xxxxxxxx -s 30,xhci,tablet  -s 31,lpc -l com1,stdio -l bootrom,/usr/local/cbsd/upgrade/patch/efi.fd   dev-fbsd-120-2-ent-1

The command above is almost the same as the command below. I tried to simulate this command according to the command of the test machine and it became a code like below.
Code:
/usr/bin/nice -n 1 /usr/sbin/bhyve  -c 1 -m 5368709120 -H -A -U 37622ae0-689b-11ec-89a4-589cfc10ff80 -s 0,hostbridge   -s 4,virtio-blk,/usr/jails/jails-data/dev-fbsd-120-2-ent-1-data/dsk1.vhd,sectorsize=512/4096   -s 2,ahci-cd,/usr/jails/src/iso/cbsd-iso-FreeBSD-13.0-RELEASE-amd64-disc1.iso,ro  -s 6,virtio-net,tap2,mtu=1500,mac=00:50:56:01:00:53  -s 7,virtio-rnd  -s 15,fbuf,tcp=127.0.0.1:5900,w=1024,h=768,password=cbsd -s 30,xhci,tablet  -s 31,lpc -l com1,stdio -l bootrom,/usr/local/cbsd/upgrade/patch/efi.fd   dev-fbsd-120-2-ent-1
The strange thing is, the commands I put in this work the same as cbsd bstart. So the only difference is that I do not enter the command manually. While the test machine is running smoothly and the command it runs is very similar to the run command of the machine I am carrying, why is the virtual machine I am moving not running?

roccobaroccoSC I'm a bit of a novice at this. I'm waiting for more details from you. Is that what you meant? If so, unfortunately it doesn't work as you said. Can you specify the command while helping me.​

 
I don't think debugging with gdb would help you in this situation. It is too low-level and you probably would do just fine analyzing the log files.
I assume something is wrong with the exported virtual machine image. You wrote you used cbsd bexport and cbsd bimport, right? Can you try to simply copy the image file (not use export or import)? Just copy the image in the shell and try to use the file directly. What happens then?
 
Back
Top