Pass the parameter clock rt to qemu to ensure that the virtual machine is not synchronized with the host time --- src/conf/domain_conf.c | 1 + src/qemu/qemu_command.c | 3 +++ src/qemu/qemu_validate.c | 1 + 3 files changed, 5 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index dab4f10..c19124d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1106,6 +1106,7 @@ VIR_ENUM_IMPL(virDomainTimerTrack, "boot", "guest", "wall", + "realtime", ); VIR_ENUM_IMPL(virDomainTimerTickpolicy, diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1ec302d..5e09aa0 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5947,6 +5947,9 @@ qemuBuildClockArgStr(virDomainClockDefPtr def) case VIR_DOMAIN_TIMER_TRACK_WALL: virBufferAddLit(&buf, ",clock=host"); break; + case VIR_DOMAIN_TIMER_TRACK_REALTIME: + virBufferAddLit(&buf, ",clock=rt"); + break; } switch (def->timers[i]->tickpolicy) { diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index a060bd9..d4fe40f 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -444,6 +444,7 @@ qemuValidateDomainDefClockTimers(const virDomainDef *def, case -1: /* unspecified - use hypervisor default */ case VIR_DOMAIN_TIMER_TRACK_GUEST: case VIR_DOMAIN_TIMER_TRACK_WALL: + case VIR_DOMAIN_TIMER_TRACK_REALTIME: break; case VIR_DOMAIN_TIMER_TRACK_BOOT: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -- 1.8.3.1