<timer>elements in the domain XML. The domain XML can be edited using the
virsh editcommand. For details, see Section 20.22, “Editing a Guest Virtual Machine's XML Configuration Settings”.
... <clock offset='localtime'> <timer name='rtc' tickpolicy='catchup' track='guest'> <catchup threshold='123' slew='120' limit='10000'/> </timer> <timer name='pit' tickpolicy='delay'/> </clock> ...
Figure 23.26. Timekeeping
Table 23.11. Timekeeping elements
| || The |
| ||See Note|
| || Specifies whether a particular timer is available to the guest virtual machine. Can be set to |
<clock>element can have zero or more
<timer>elements as children. The
<timer>element specifies a time source used for guest virtual machine clock synchronization.
<timer>element only the
nameis required, and all other attributes are optional:
name- Selects which
timeris being modified. The following values are acceptable:
track- Specifies the timer track. The following values are acceptable:
trackis only valid for
tickpolicy- Determines what happens when the deadline for injecting a tick to the guest virtual machine is missed. The following values can be assigned:
delay- Continues to deliver ticks at the normal rate. The guest virtual machine time will be delayed due to the late tick.
catchup- Delivers ticks at a higher rate in order to catch up with the missed tick. The guest virtual machine time is not displayed once catch up is complete. In addition, there can be three optional attributes, each a positive integer: threshold, slew, and limit.
merge- Merges the missed tick(s) into one tick and injects them. The guest virtual machine time may be delayed, depending on how the merge is done.
discard- Throws away the missed tick(s) and continues with future injection at its default interval setting. The guest virtual machine time may be delayed, unless there is an explicit statement for handling lost ticks.
Example 23.1. Always synchronize to UTC
<clock offset="utc" />
Example 23.2. Always synchronize to the host physical machine timezone
<clock offset="localtime" />
Example 23.3. Synchronize to an arbitrary time zone
<clock offset="timezone" timezone="Europe/Paris" />
Example 23.4. Synchronize to UTC + arbitrary offset
<clock offset="variable" adjustment="123456" />