Skip to content

Instantly share code, notes, and snippets.

@papertigers
Last active October 30, 2019 12:26
Show Gist options
  • Save papertigers/ca487301fff14d75d35d1dd8af252de1 to your computer and use it in GitHub Desktop.
Save papertigers/ca487301fff14d75d35d1dd8af252de1 to your computer and use it in GitHub Desktop.
bhyve mask viona features

Hiding viona guest checksumming

This is a "workaround" until the bhyve_config stuff is done.

Modified bhyve brand boot

You need to build a platform with this patch. If you are feeling lazy you can grab the binary of that file here.

Mount the file

If you chose to build the platform you can skip this step.

If you grabbed the file from my manta link you need to lofs mount boot over the one shipped with the platform: mount -F lofs /path/to/bhyve-boot /usr/lib/brand/bhyve/boot

Modify the zone config

zonecfg -z uuid

Using the interface you want to turn guest checksumming off for (net0 in this case):

zonecfg:ed8fec44-2322-c79a-9472-bfa5b69e51fc> select net physical=net0
zonecfg:ed8fec44-2322-c79a-9472-bfa5b69e51fc:net> add property (name=feature_mask, value=2)
zonecfg:ed8fec44-2322-c79a-9472-bfa5b69e51fc:net> end
zonecfg:ed8fec44-2322-c79a-9472-bfa5b69e51fc> verify
zonecfg:ed8fec44-2322-c79a-9472-bfa5b69e51fc> commit

Boot

vmadm stop uuid (if currently running)

vmadm start uuid

On reboot

In order to have the changes applied you will have to reissue the lofs mount from above. Once done, you can stop/start the VM to have the viona changes applied again. Leaving in the net property in zonecfg is harmless if you end up on a platform without the boot file changes the property is simply ignored.

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