Skip to content

Instantly share code, notes, and snippets.

@dlangille
Last active November 29, 2022 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlangille/a3ed1482aa254dd2400d1a46cba11105 to your computer and use it in GitHub Desktop.
Save dlangille/a3ed1482aa254dd2400d1a46cba11105 to your computer and use it in GitHub Desktop.
I'm trying to get HomeAssistant working under #bhyve on #FreeBSD. I'm following https://community.home-assistant.io/t/installing-home-assistant-hassos-in-freebsd-bhyve-vm/223492 but I can't get the vm to start. https://twitter.com/DLangille/status/1595794060035457025
vm img https://github.com/home-assistant/operating-system/releases/download/9.3/haos_ova-9.3.qcow2.xz
vm create -t debian -c 4 -m 4GB -s 200G -i haos_ova-9.3.qcow2.xz home-assistant
[slocum root /usr/local/vm/home-assistant] # cat home-assistant.conf
loader="uefi"
graphics="yes"
xhci_mouse="yes"
graphics_listen="10.55.0.73"
graphics_port="5900"
graphics_wait="no"
graphics_res="800x600"
cpu="4"
memory="4GB"
network0_type="virtio-net"
network0_switch="public"
disk0_type="ahci-hd"
disk0_name="disk0.img"
disk0_dev="sparse-zvol"
uuid="dd5373a3-6b77-11ed-a655-002590fa0f10"
network0_mac="58:9c:fc:09:45:e7"
[slocum root /usr/local/vm/home-assistant] #
[slocum root /usr/local/vm/home-assistant] # vm start -i home-assistant
Starting home-assistant
* found guest in /usr/local/vm/home-assistant
* booting...
[slocum dan ~] % tail -F /usr/local/vm/home-assistant/vm-bhyve.log
Nov 24 14:01:55: initialising
Nov 24 14:01:55: [loader: uefi]
Nov 24 14:01:55: [cpu: 4]
Nov 24 14:01:55: [memory: 4GB]
Nov 24 14:01:55: [hostbridge: standard]
Nov 24 14:01:55: [com ports: com1]
Nov 24 14:01:55: [uuid: dd5373a3-6b77-11ed-a655-002590fa0f10]
Nov 24 14:01:55: [debug mode: no]
Nov 24 14:01:55: [primary disk: disk0.img]
Nov 24 14:01:55: [primary disk dev: sparse-zvol]
Nov 24 14:01:55: initialising network device tap1
Nov 24 14:01:55: adding tap1 -> vm-public (public addm)
Nov 24 14:01:55: bring up tap1 -> vm-public (public addm)
Nov 24 14:01:55: booting
Nov 24 14:01:55: [bhyve options: -c 4 -m 4GB -Hwl bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -U dd5373a3-6b77-11ed-a655-002590fa0f10 -u]
Nov 24 14:01:55: [bhyve devices: -s 0,hostbridge -s 31,lpc -s 4:0,ahci-hd,/dev/zvol/system/vm/home-assistant/disk0.img -s 5:0,virtio-net,tap1,mac=58:9c:fc:09:45:e7 -s 6:0,fbuf,tcp=10.55.0.72:5900,w=800,h=600 -s 7:0,xhci,tablet]
Nov 24 14:01:55: [bhyve console: -l com1,/dev/nmdm-home-assistant.1A]
Nov 24 14:01:55: starting bhyve (run 1)
Nov 24 14:01:55: bhyve exited with status 4
Nov 24 14:01:55: destroying network device tap1
Nov 24 14:01:55: stopped
@dlangille
Copy link
Author

I have had success in getting a VM running with https://blog.david-reid.com/home-assistant-on-freebsd/

I can't connect to port 80 yet, but let's see.

@bsdjhb
Copy link

bsdjhb commented Nov 29, 2022

I haven't used vm-bhyve myself, but I think there's some way to get it to log the output of bhyve which should have output an error before exiting. A status of 4 means bhyve hit some error like an invalid config setting and exited without starting up.

@dlangille
Copy link
Author

I haven't used vm-bhyve myself, but I think there's some way to get it to log the output of bhyve which should have output an error before exiting. A status of 4 means bhyve hit some error like an invalid config setting and exited without starting up.

I should have been trying port 8123 but that wasn't the problem. I did get bhyve running though using https://t.co/ZSDWPZfAno

see: https://twitter.com/DLangille/status/1595792955071242242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment