Skip to content

Instantly share code, notes, and snippets.

@citrus-it
Last active May 2, 2018 13:54
Show Gist options
  • Save citrus-it/df97cb766a359f8b85701931abe81ab3 to your computer and use it in GitHub Desktop.
Save citrus-it/df97cb766a359f8b85701931abe81ab3 to your computer and use it in GitHub Desktop.
OmniOS bhyve
pfexec bhyve
-H
-B "1,product=OmniOS HVM"
# SmartOS never specifies a hostbridge, amd_hostbridge is needed for at least Free/OpenBSD
# Options are none, hostbridge or amd_hostbridge
# NB: For 'hostbridge' vendor and device are set to a NetApp id
-s 0,amd_hostbridge
# LPC PCI-ISA bridge providing connectivity to com1, com2, and bootrom
-s 1,lpc
-l bootrom,/usr/share/bhyve/firmware/BHYVE_CSM.fd
# SmartOS does not support the 'wait' attribute.
# They attach com1 to the zone console when inside a zone allowing zlogin -C to the guest.
-l com1,socket,/tmp/test.cons,wait
# -l com1,stdio
-c 4 # CPUs
-m 1G # RAM
# On SmartOS they appear to use virtio-blk with CD devices, can't see how that can work.
-s 2:0,ahci-cd,/build/iso/smartos-latest.iso
# boot disk is always 3:0
-s 3:0,virtio-blk,/dev/zvol/rdsk/rpool/hdd-bhyve
# Other disks 4:n - limits to 8 disks but could put others on 6:x etc.
-s 4:0,virtio-blk,/dev/zvol/rdsk/rpool/hdd-bhyve1
-s 4:1,virtio-blk,/dev/zvol/rdsk/rpool/hdd-bhyve2
# Can also do the following for multiple disks on the same controller but only for ahci
#-s 4:0,ahci,hd:/dev/zvol/rdsk/rpool/hdd-bhyve1,hd:/dev/zvol/rdsk/rpool/hdd-bhyve2
# 'primary' net on :0, others :1+
-s 5:0,virtio-net-viona,bhyve0
-s 5:1,virtio-net-viona,bhyve1
# VM name
test
Also, with UEFI bootrom:
-s 30,fbuf,vga=off,tcp=10.0.0.1:5900,wait,w=1024,h=768
-s 31,xhci,tablet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment