Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set UTC mode if utc=YES #306

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/ioh-guest
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ __guest_install() {
fi
local name="$2"
local iso="$3"

if [ -z "$iso" ]; then
printf "missing argument\nusage:\n"
printf "\tinstall <name> <ISO>\n"
Expand Down Expand Up @@ -474,6 +474,7 @@ __guest_boot() {
local persist="$(zfs get -H -o value iohyve:persist $dataset)"
local bargexist="$(zfs get -H -o value iohyve:bargs $dataset)"
local bargs="$(echo $bargexist | sed -e 's/_/ /g')"
local utc="$(zfs get -H -o value iohyve:utc $dataset)"
# Check if bhyve path is set, set default if not
local bhyve_path="$(zfs get -H -o value iohyve:bhyve_path $dataset)"
if [ "$bhyve_path" = "-" ]; then
Expand All @@ -490,7 +491,12 @@ __guest_boot() {
while [ $runstate = "1" ]
do
__guest_load "$name" "/dev/zvol/$dataset/disk0"
$bhyve_path -c $cpu $bargs -m $ram $pci_args -lcom1,/dev/${con}A ioh-$name &
if [ $utc = "YES" ]; then
utcline="-u"
else
utcline=""
fi
$bhyve_path -c $cpu $bargs -m $ram $pci_args $utcline -lcom1,/dev/${con}A ioh-$name &
local vmpid=$!
wait $vmpid
vmrc=$?
Expand Down