This patch series attempts to add time resync support to qemu-ga by introducing qemu-ga commands guest-get-time and guest-set-time.
Right now, when a guest is paused or migrated to a file then loaded from that file, the guest OS has no idea that there was a big gap in the time. Depending on how long the gap was, NTP might not be able to resynchronize the guest. So adding new guest-agent command that is called any time a guest is resumed and which tells the guest to update its own wall clock time based on the information from the host will make it easier for a guest to resynchronize without waiting for NTP. The previous RFC send for discussion and suggestion as link here: http://article.gmane.org/gmane.comp.emulators.qemu/186126 The interface for these commands like: { 'command': 'guest-get-time', 'returns': 'HostTimeInfo' } { 'command': 'guest-set-time', 'data': { '*seconds': 'int', '*microseconds': 'int', '*utc-offset': 'int' } } TODO: This is a RFC version with POSIX-specific command implemented. I just test on Linux guest, will add win32-specific command to support Windows guest later. Since I want to make sure if this seems like the way we should be headed. Your comments and suggestions are very welcome! Lei Li (3): qga: add support to get host time qga: add guest-get-time command qga: add guest-set-time command