[RFC PATCH 1/2] conf: Introduce 'absolute' clock offset

Pavel Hrdina phrdina at redhat.com
Wed May 4 10:44:21 UTC 2022


On Tue, Apr 26, 2022 at 05:34:21PM +0200, Peter Krempa wrote:
> The 'absolute' clock offset type has a 'start' attribute which is an
> unix epoch timestamp to which the hardware clock is always set at start
> of the VM.
> 
> This is useful if some VM needs to be kept set to an arbitrary time for
> e.g. testing or working around broken software.
> 
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
>  docs/formatdomain.rst                         |  4 ++
>  src/conf/domain_conf.c                        | 13 +++++++
>  src/conf/domain_conf.h                        |  4 ++
>  src/conf/schemas/domaincommon.rng             |  8 ++++
>  src/libxl/libxl_conf.c                        |  1 +
>  tests/qemuxml2argvdata/clock-absolute.xml     | 30 +++++++++++++++
>  .../clock-absolute.x86_64-latest.xml          | 38 +++++++++++++++++++
>  tests/qemuxml2xmltest.c                       |  1 +
>  8 files changed, 99 insertions(+)
>  create mode 100644 tests/qemuxml2argvdata/clock-absolute.xml
>  create mode 100644 tests/qemuxml2xmloutdata/clock-absolute.x86_64-latest.xml
> 
> diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
> index 9be305f3e6..5639a3014b 100644
> --- a/docs/formatdomain.rst
> +++ b/docs/formatdomain.rst
> @@ -2170,6 +2170,10 @@ Windows, however, expects it to be in so called 'localtime'.
>        the RTC adjustments are lost at each reboot. :since:`Since 0.7.7`
>        :since:`Since 0.9.11` the ``basis`` attribute can be either 'utc'
>        (default) or 'localtime'.
> +   ``absolute``
> +      The guest clock will be always set to the value of the ``start``
> +      attribute. The ``start`` attribute takes the an epoch timestamp.

s/the an/an/

> +      :since:`Since 8.4.0`.
> 
>     A ``clock`` may have zero or more ``timer`` sub-elements. :since:`Since
>     0.8.0`
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220504/a04906ad/attachment.sig>


More information about the libvir-list mailing list