Skip to content

Instantly share code, notes, and snippets.

@marcheschi
Created November 16, 2021 09:40
Show Gist options
  • Save marcheschi/4b57da360d8a5fc3160bff57f975c8d4 to your computer and use it in GitHub Desktop.
Save marcheschi/4b57da360d8a5fc3160bff57f975c8d4 to your computer and use it in GitHub Desktop.
Create New Bhyve HVM for Smartos
wget --no-check-certificate https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64-disk-kvm.img
After we create a BHYVE VM with blank IMAGE
and we deploy it, after we stop it.
Update bootrom
vmadm update <vm_uuid> bootrom=/usr/share/bhyve/uefi-rom.bin
es:
vmadm update a5ba7c78-1e03-4692-93ae-9586c9760606 bootrom=/usr/share/bhyve/uefi-rom.bin
after we convert the image to the right disk:
qemu-img convert -p -f qcow2 -O host_device focal-server-cloudimg-amd64-disk-kvm.img /dev/zvol/rdsk/zones/a5ba7c78-1e03-4692-93ae-9586c9760606/disk0
You can do a Snapshot and create an image from VM
If you start the VM it will start the VM you installed ,
Only certain images will work, for example this works for me:
https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64-disk-kvm.img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment