bhyve vm-bhyve failed to graphically install Debian-based os

vm-bhyve version: 1.6-devel
FreeBSD version: 14.3

Hi, I am new to vm-bhyve and trying to install a Debian-based Linux NAS OS named fnos and failed, error shows as below:

Code:
# vm create -t fnos -s 25G fnos

# vm install -f fnos fnos-0.9.29-1142.iso
Starting fnos
  * found guest in /usr/local/bhyve/fnos
  * booting...
fbuf frame buffer base: 0x211ca7600000 [sz 16777216]

Also failed to connect to it through VNC, the following is my configuration:

Code:
# cat /usr/local/bhyve/.templates/fnos.conf

loader="uefi"
graphics="yes"
xhci_mouse="yes"
graphics_res="1280x720"
graphics_listen="192.168.31.240"
graphics_port="5900"
graphics_wait="yes"
cpu="1"
memory="4G"
disk0_type="virtio-blk"
disk0_name="disk0.img"
network0_type="virtio-net"
network0_switch="public"

I followed this article to install bhyve and the steps are as below:

Code:
sysrc cloned_interfaces="bridge0"
sysrc ifconfig_bridge0_name="publicnet0"
sysrc ifconfig_publicnet0="addm igb0 up"
service netif restart
echo 'vmm_load="YES"' >> /boot/loader.conf
kldload vmm
zfs create -o mountpoint=/usr/local/bhyve/ work/bhyve
zfs create -o mountpoint=/usr/local/bhyve/data data/byhve # Optional
pkg install -y tmux vm-bhyve bhyve-firmware grub2-bhyve qemu-tools
service vm enable
sysrc vm_dir="zfs:work/bhyve"
sysrc vm_list=""sysrc vm_delay="5"
vm init
vm set console=tmux
cp /usr/local/share/examples/vm-bhyve/* /usr/local/bhyve/.templates/
vm switch create -t manual -b publicnet0 public
reboot

Code:
# vm list

NAME  DATASTORE  LOADER  CPU  MEMORY  VNC  AUTO  STATE
fnos  default    uefi    1    4G      -    No    Stopped

Code:
# vm install -f fnos fnos-0.9.29-1142.iso
Starting fnos
  * found guest in /usr/local/bhyve/fnos
  ! guest appears to be running already

# vm start fnos
Starting fnos
  * found guest in /usr/local/bhyve/fnos
  ! guest appears to be running already

# vm stop fnos
/usr/local/sbin/vm: WARNING: unable to locate process id for fnos

# vm destroy fnos
/usr/local/sbin/vm: WARNING: fnos appears to be running locally (vmm exists)

Failed to destroy this vm, so:

Code:
# bhyvectl --vm=fnos --destroy

Then, ok to destroy this vm.

Code:
# vm list
NAME  DATASTORE  LOADER  CPU  MEMORY  VNC  AUTO  STATE
fnos  default    uefi    1    4G      -    No    Stopped

# vm destroy fnos
Are you sure you want to completely remove this virtual machine (y/n)? y

# vm list
NAME  DATASTORE  LOADER  CPU  MEMORY  VNC  AUTO  STATE



Please tell me what's more information needed. Thanks.
 
I might as well spam my own page https://srobb.net/vm-bhyve.html. It's for using vm-byve, which makes it much easier. My Debian uses a template like
loader="uefi" graphics="yes" graphics_res="1920x1080" xhci_mouse="yes" cpu="4" memory="4096" network0_type="virtio-net" network0_switch="public" disk0_type="virtio-blk" disk0_name="disk0.img" bhyve_options="-s 8,hda,play=/dev/dsp" uuid="8bdf3c02-6ab4-11f0-a91a-b0416f14e95f" network0_mac="58:9c:fc:07:db:e6"
The uuid and network are automatically created. I used a simple window manager, openbox, and didn't specifically install a driver but when I install xorg-server (or whatever Debian calls it) it pulled in a whole bunch of stuff.

Using vm-bhyve will make the whole thing easier, in my humble opinion.
 
I should add the sound stuff can be done more simply--for the bhyve sound, I've also used
sound="yes" sound_play="dev/dsp"
 
I don't know this fnos distro, just few hints:
1) "Can't connect via VNC" sometimes means a firewall issue, if you can turn it off to see if this works.
2) Try the same config but with a normal Debian, this way you'll know if the problem is coming from your configuration or your Debian-based OS.

Good luck.
 
scottro In your instructions you write:
I'd use zfs create zroot/vm. The directory path line in /etc/rc.conf would be
vm_dir="zfs:zroot/vm"

(This seems to have changed--in 14.2-RELEASE it's /zroot/vm)
does that mean it's
Code:
vm_dir="zfs:/zroot/vm"
or
Code:
vm_dir="/zroot/vm"
?
 
I see that I have in /etc/rc.conf
Code:
vm_dir="zroot/vm"
and it works for creating vms. But I don't remember how I got that, I seem to vaguely remember that doing zfs:/zroom/vm didn't work. I should update that part of the page, as I can't remember well enough to answer your, what should be a simple, question.
 
drhowarddrfine, I updated the page saying I'm not sure, but I also put in a link to a page of vermaden's where he gives a bit more info. I think what I left out was mounting the vm directory, but I'll have to test it all at some point. Anyway, vermaden's page is here.
 
drhowarddrfine, I've fixed the page. It should be, assuming you have the default zroot pool
Code:
zfs create -o mountpoint=vm zroot/vm
Then rc.conf would have
Code:
vm_enable="YES"
vm_dir="zfs:zroot/vm"

Got the info I was missing from vermaden's page and got a chance to play with it today.
 
Back
Top