Francesco Romani has uploaded a new change for review. Change subject: vm: hyperv: switch to 'hypervclock' clock source ......................................................................
vm: hyperv: switch to 'hypervclock' clock source Move to 'hypervclock' clock source, as it is recommended by the 'HyperV enlightenment' enhancement patchset. A noteworthy side effect of this change is the disappareance of the 'track=guest' attribute for clock source for windows guests, which we introduced in commit f59abc1c321fa0f. The reason we added 'track=guest' back in time are outlined here: http://libvirt.org/formatdomain.html#elementsTime However, that was done only for hyperv guests, under the assumption that 1. only windowses benefit from this setting 2. other OSes either didn't care or didn't gain anything. Now we want to switch from name=rtc to name=hypervclock, but we run this issue (quoting libvirt docs): track The track attribute specifies what the timer tracks, and can be "boot", "guest", or "wall". Only valid for name="rtc" or name="platform". Hence, if we move from "rtc" to "hypervclock", the "track=guest" attribute must go away, only because hypervclock doesn't support it. Change-Id: I47e207aef007b75fce57921df8012b55546705b7 Bug-Url: https://bugzilla.redhat.com/1083529 Signed-off-by: Francesco Romani <[email protected]> --- M debian/control M tests/vmTests.py M vdsm/virt/vmxml.py 3 files changed, 14 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/39698/1 diff --git a/debian/control b/debian/control index a22f029..9d659e3 100644 --- a/debian/control +++ b/debian/control @@ -106,8 +106,8 @@ python-rpm, python-selinux, python-sepolgen, - qemu-kvm (>= 1.4.0), - qemu-utils (>= 1.4.0), + qemu-kvm (>= 2.0.0), + qemu-utils (>= 2.0.0), sanlock (>= 2.4), sanlock-python (>= 2.4), sasl2-bin, diff --git a/tests/vmTests.py b/tests/vmTests.py index 4607a5e..7cba205 100644 --- a/tests/vmTests.py +++ b/tests/vmTests.py @@ -285,7 +285,7 @@ def testHyperVClockXML(self): clockXML = """ <clock adjustment="-3600" offset="variable"> - <timer name="rtc" tickpolicy="catchup" track="guest"/> + <timer name="hypervclock" tickpolicy="catchup"/> <timer name="pit" tickpolicy="delay"/> <timer name="hpet" present="no"/> </clock>""" diff --git a/vdsm/virt/vmxml.py b/vdsm/virt/vmxml.py index 5fdcde3..69267cf 100644 --- a/vdsm/virt/vmxml.py +++ b/vdsm/virt/vmxml.py @@ -178,13 +178,21 @@ <clock offset="variable" adjustment="-3600"> <timer name="rtc" tickpolicy="catchup"> </clock> + + for hyperv: + <clock offset="variable" adjustment="-3600"> + <timer name="hypervclock" tickpolicy="catchup"> + </clock> """ + + if utils.tobool(self.conf.get('hypervEnable', 'false')): + clockName = 'hypervclock' + else: + clockName = 'rtc' m = Element('clock', offset='variable', adjustment=str(self.conf.get('timeOffset', 0))) - rtc = m.appendChildWithArgs('timer', name='rtc', tickpolicy='catchup') - if utils.tobool(self.conf.get('hypervEnable', 'false')): - rtc.setAttrs(track='guest') + m.appendChildWithArgs('timer', name=clockName, tickpolicy='catchup') m.appendChildWithArgs('timer', name='pit', tickpolicy='delay') if self.arch == caps.Architecture.X86_64: -- To view, visit https://gerrit.ovirt.org/39698 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47e207aef007b75fce57921df8012b55546705b7 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
