Skip to content

Upgrading from v0.6.0 to v0.6.5 and above

pr1ntf edited this page Apr 14, 2016 · 2 revisions

Quick note about upgrading from v0.6.0 to v0.6.5 and above

iohyve can now set custom bhyve flags when launching guests. Instead of being stuck with the default I set up as bhyve -A -H -P etc... you can now edit those flags using the bargs property.

For instance, if you want the bhyve RTC to use UTC time, do the following:

iohyve set bsdguest bargs="-A -H -P -u"

Note that you must put your arguments inbetween double quotes ("). iohyve will take care of the rest.

As to not break guests created before v6.5, iohyve will still launch with defaults, but will throw the error:

iohyve start bsdguest
Starting bsdguest... (Takes 15 seconds for FreeBSD guests)
This version of your guest is outdated.
Please run iohyve fix-bargs guestname to update.

To set default arguments, I have added the fix-bargs function. Simply run iohyve fix-bargs bsdguest and iohyve will set a default.

# Fix legacy bhyve arguments
__fixbargs() {
	local name="$2"
	local pool="$(zfs list -H -t volume | grep $name | grep disk0 | cut -d '/' -f 1 | head -n1)"
	echo "Setting default bargs flags for bhyve to $name..."
	zfs set iohyve:bargs=-A_-H_-P $pool/iohyve/$name
}