Skip to content

Commit 31c773c

Browse files
committed
fix: make clock driftfix compatible with qemu-system-aarch64
1 parent 4b4008d commit 31c773c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

quickemu

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ function vm_boot() {
11761176
args+=(-machine ${MACHINE_TYPE},smm=${SMM},vmport=off,accel=${QEMU_ACCEL} ${GUEST_TWEAKS}
11771177
${CPU} ${SMP}
11781178
-m ${RAM_VM} ${BALLOON}
1179-
-rtc base=localtime,clock=host,driftfix=slew
1179+
-rtc base=localtime,clock=host,driftfix=${driftfix}
11801180
-pidfile "${VMDIR}/${VMNAME}.pid")
11811181

11821182
# shellcheck disable=SC2206
@@ -1818,6 +1818,7 @@ disk_format="${disk_format:-qcow2}"
18181818
disk_img="${disk_img:-}"
18191819
disk_size="${disk_size:-16G}"
18201820
display="${display:-sdl}"
1821+
driftfix="${driftfix:-slew}"
18211822
extra_args="${extra_args:-}"
18221823
fixed_iso=""
18231824
floppy=""
@@ -2032,6 +2033,12 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
20322033
if [ -z "${disk_img}" ]; then
20332034
disk_img="${VMDIR}/disk.${disk_format}"
20342035
fi
2036+
2037+
# slew for clock drift_fix is not available on aaarch64
2038+
if [ "${arch_vm}" != "x86_64" ]; then
2039+
driftfix="none"
2040+
fi
2041+
20352042
QEMU_IMG=$(command -v qemu-img)
20362043
QEMU=$(command -v "qemu-system-${arch_vm}")
20372044

0 commit comments

Comments
 (0)