Add feature-complete /domain/clock support

Feature reference: https://libvirt.org/formatdomain.html#time-keeping
This commit is contained in:
Bart Kus
2023-01-25 22:33:20 -08:00
parent 6b907ab6e0
commit 78e46979e0
7 changed files with 68 additions and 9 deletions

View File

@@ -47,7 +47,7 @@
<spinlocks state='on' retries='4096' />
</hyperv>
</features>
<clock offset='variable'>
<clock offset='variable' basis='localtime' adjustment='-31536000'>
<timer name='t1'/>
<timer name='t2' track='b' tickpolicy='c' frequency='d' mode='e' present='yes'/>
</clock>

View File

@@ -62,7 +62,8 @@ describe 'templates/domain' do
domain.cpu_mode = 'custom'
domain.cpu_feature(name: 'AAA', policy: 'required')
domain.hyperv_feature(name: 'BBB', state: 'on')
domain.clock_offset = 'variable'
domain.clock_adjustment = -(365 * 24 * 60 * 60)
domain.clock_basis = 'localtime'
domain.clock_timer(name: 't1')
domain.clock_timer(name: 't2', track: 'b', tickpolicy: 'c', frequency: 'd', mode: 'e', present: 'yes')
domain.hyperv_feature(name: 'spinlocks', state: 'on', retries: '4096')