Linux: Wie der Guest VM's Kernel ist Zeit
-
14-11-2019 - |
Frage
In Linux leite ich eine Vermutung von VM und lädt ein anderes Beispiel von Linux.VM wird durch KVM / Libvirt / Qemu aufgewickelt.Gast VM wird vom Gastgeber als Prozess angesehen.Lassen Sie uns aus irgendeinem Grund sagen, dass der Gast VM QEMU-Prozess nicht irgendwann geplant wird. Wie bleibt der Kernel in der VM-Zeit?Nehmen wir an, ich habe einen Timer in meiner Anwendung in der Gäste VM.Wenn der Gast VM QEMU selbst nicht geplant wird, wirkt sich dies auf meinen Timer-Ablauf aus?
Lösung
Some virtualization solutions have the VM clock(s) hooked to some host clock(s), so that the VM clock does not tick independently. In other cases, no such thing may occur (relying on an emulated interrupt clock for example), which then does lead to clock skew. The wall clock skew you can attempt to combat with ntpd, but for things like CLOCK_MONOTONIC, you will probably have to live with it.