Skip to content

Instantly share code, notes, and snippets.

Mike Gerdts mgerdts

  • Joyent
  • Madison, WI
Block or report user

Report or block mgerdts

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mgerdts /
Last active Jun 21, 2019


This fixes

9318 vol_volsize_to_reservation does not account for raidz skip blocks

$ git whatchanged -v master..
commit 969a6b100f3e67c3a623d898c3825506f1a40b49
Author: Mike Gerdts <>
mgerdts /
Created Jun 12, 2019
building illumos on omnios
mgerdts / changes.txt
Created May 14, 2019
debugging bhyve with mdb from host
View changes.txt
commit 2d1a8a4a97fe44c06e3fedddbb32f89fc2755a3e
Author: Hans Rosenfeld <>
Date: Tue Jan 15 16:29:40 2019 +0100
OS-7508 mdb: assertion tripped in libvmm when bhyve VM halts while mdb is attached
OS-7519 mdb: bhyve target can attach before the first vCPU is configured
commit 2a78db82bec123064d30d051995cb4d577ca04ba
Author: Hans Rosenfeld <>
Date: Wed Feb 13 16:08:32 2019 +0000
mgerdts /
Last active Jan 3, 2019

The panic is seen on Linux. Screenshots of the panic: 1 2 3

I built ZoL on xubuntu 18.04 with this commit at the tip.

I suspect the clones difference between @7 and @8 is due to the interrupted receive.

root@xubuntu:~# zfs get -o property,value all rpool/crypto/vol0@7  > /tmp/7
root@xubuntu:~# zfs get -o property,value all rpool/crypto/vol0@8  > /tmp/8
root@xubuntu:~# sdiff  /tmp/7 /tmp/8

Bhyve Machine Images

Each bhyve virtual machine (guest) uses a machine image. A machine image is sometimes called a guest image. Bhyve machine images are quite similar to KVM machine images. In fact, it is sometimes possible to create hybrid images that work with bhyve or KVM.

Bhyve is different from KVM in a few ways that are quite relevant to machine images. In particular:

  • Bhyve supports UEFI and emulates legacy BIOS via a Compatibility Support Module (CSM). The CSM is not as full-featured as SeaBIOS used with KVM.
  • Network configuration via a per-instance DHCP server is not supported.

The following sections describe the relevance of these differences and how to overcome them in many cases.

mgerdts /
Last active Nov 7, 2018
Upgrade cloud-init on CentOS 6

This shows how to upgrade cloud-init from the one found in the early CentOS 6 bhyve images and create a new image from that.

Create a source instance

First, we will install an instance using image 11891f44-a374-11e8-9c35-c7bfcc724881.

The vmadm payload

mgerdts /
Last active Nov 1, 2018
coal and docker and a particular version
mgerdts /
Last active Oct 8, 2018
Fix console on ubuntu images

Redirect Ubuntu Console to First Serial Port

The cloud images that Canonical provides has the grub and linux console on the VGA port. This doesn't work so well for bhyve, where the graphical console only works with uefi. This document describes how to fix that using SmartOS.

Select a source image

The source image needs to include cloud-init 18.3 or later. Any Ubuntu 16.04 or later image produced by Canonical starting in July, 2018 should fit this criteria. The image in this example is described as Ubuntu 18.04.1 LTS (20180808 64-bit). Certified Ubuntu Server Cloud Image from Canonical..


What source code went into this OS build?

> gitstatus_start/s
        "repo": "smartos-live",
        "branch": "hacks",
        "commit_date": "1538755931",
mgerdts /
Last active Apr 18, 2019
Install windows with bhyve

These are bare-bones instructions for creating a Windows image for bhyve on SmartOS. You will need a platform image that has the fix for OS-7117. Platform images that I've used in testing are here: iso tgz usb

Create a volume that will be the disk.

zfs create -o volblocksize=4k -V 16g -s zones/hdd-windows

This script will be used for booting from the CD.

You can’t perform that action at this time.