Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 7907fb4

Browse files
committed
qemu: add clock=vm parameter
Signed-off-by: Peng Tao <[email protected]>
1 parent b5028b0 commit 7907fb4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

hypervisor/qemu/qemu_amd64.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (qc *QemuContext) arguments(ctx *hypervisor.VmContext) []string {
6363

6464
params = append(params,
6565
"-realtime", "mlock=off", "-no-user-config", "-nodefaults", "-no-hpet",
66-
"-rtc", "base=utc,driftfix=slew", "-no-reboot", "-display", "none", "-boot", "strict=on",
66+
"-rtc", "base=utc,clock=vm,driftfix=slew", "-no-reboot", "-display", "none", "-boot", "strict=on",
6767
"-m", memParams, "-smp", cpuParams)
6868

6969
if boot.BootToBeTemplate || boot.BootFromTemplate {

hypervisor/qemu/qemu_arm64.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (qc *QemuContext) arguments(ctx *hypervisor.VmContext) []string {
8484
return append(params,
8585
"-kernel", boot.Kernel, "-initrd", boot.Initrd, "-append", "console=ttyAMA0 panic=1",
8686
"-realtime", "mlock=off", "-no-user-config", "-nodefaults",
87-
"-rtc", "base=utc,driftfix=slew", "-no-reboot", "-display", "none", "-boot", "strict=on",
87+
"-rtc", "base=utc,clock=vm,driftfix=slew", "-no-reboot", "-display", "none", "-boot", "strict=on",
8888
"-m", memParams, "-smp", cpuParams,
8989
"-device", "pci-bridge,chassis_nr=1,id=pci.0",
9090
"-qmp", fmt.Sprintf("unix:%s,server,nowait", qc.qmpSockName), "-serial", fmt.Sprintf("unix:%s,server,nowait", ctx.ConsoleSockName),

hypervisor/qemu/qemu_ppc64le.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (qc *QemuContext) arguments(ctx *hypervisor.VmContext) []string {
4545
"-machine", "pseries,accel=kvm,usb=off", "-global", "kvm-pit.lost_tick_policy=discard", "-cpu", "host",
4646
"-kernel", boot.Kernel, "-initrd", boot.Initrd,
4747
"-realtime", "mlock=off", "-no-user-config", "-nodefaults",
48-
"-rtc", "base=utc,driftfix=slew", "-no-reboot", "-display", "none", "-boot", "strict=on",
48+
"-rtc", "base=utc,clock=vm,driftfix=slew", "-no-reboot", "-display", "none", "-boot", "strict=on",
4949
"-m", memParams, "-smp", cpuParams,
5050
"-qmp", fmt.Sprintf("unix:%s,server,nowait", qc.qmpSockName), "-serial", fmt.Sprintf("unix:%s,server,nowait", ctx.ConsoleSockName),
5151
"-device", "virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x2", "-device", "virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3",

hypervisor/qemu/qemu_s390x.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (qc *QemuContext) arguments(ctx *hypervisor.VmContext) []string {
3939
"-kernel", boot.Kernel, "-initrd", boot.Initrd,
4040
"-append", "\"console=ttyS1 panic=1 no_timer_check\"",
4141
"-realtime", "mlock=off", "-no-user-config", "-nodefaults", "-enable-kvm",
42-
"-rtc", "base=utc,driftfix=slew", "-no-reboot", "-display", "none", "-boot", "strict=on",
42+
"-rtc", "base=utc,clock=vm,driftfix=slew", "-no-reboot", "-display", "none", "-boot", "strict=on",
4343
"-m", memParams, "-smp", cpuParams,
4444
"-qmp", fmt.Sprintf("unix:%s,server,nowait", qc.qmpSockName),
4545
"-chardev", fmt.Sprintf("socket,id=charconsole0,path=%s,server,nowait", ctx.ConsoleSockName),

0 commit comments

Comments
 (0)