Skip to content

Commit 465ae47

Browse files
author
Mike Tutkowski
committed
CLOUDSTACK-8233 kvmtimer fix
1 parent c234751 commit 465ae47

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

‎plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3723,7 +3723,9 @@ So if getMinSpeed() returns null we fall back to getSpeed().
37233723
clock.setClockOffset(ClockDef.ClockOffset.LOCALTIME);
37243724
clock.setTimer("rtc", "catchup", null);
37253725
} else if (vmTO.getType() != VirtualMachine.Type.User || isGuestPVEnabled(vmTO.getOs())) {
3726-
clock.setTimer("kvmclock", null, null, _noKvmClock);
3726+
if (_hypervisorLibvirtVersion >= (9 * 1000 + 10)) {
3727+
clock.setTimer("kvmclock", null, null, _noKvmClock);
3728+
}
37273729
}
37283730

37293731
vm.addComp(clock);

‎plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ public void testCreateVMFromSpecLegacy() {
9494
vmStr += "<uuid>b0f0a72d-7efb-3cad-a8ff-70ebf30b3af9</uuid>\n";
9595
vmStr += "<description>" + os + "</description>\n";
9696
vmStr += "<clock offset='utc'>\n";
97-
vmStr += "<timer name='kvmclock' >\n";
98-
vmStr += "</timer>\n";
9997
vmStr += "</clock>\n";
10098
vmStr += "<features>\n";
10199
vmStr += "<pae/>\n";
@@ -168,8 +166,6 @@ public void testCreateVMFromSpecWithTopology6() {
168166
vmStr += "<uuid>b0f0a72d-7efb-3cad-a8ff-70ebf30b3af9</uuid>\n";
169167
vmStr += "<description>" + os + "</description>\n";
170168
vmStr += "<clock offset='utc'>\n";
171-
vmStr += "<timer name='kvmclock' >\n";
172-
vmStr += "</timer>\n";
173169
vmStr += "</clock>\n";
174170
vmStr += "<features>\n";
175171
vmStr += "<pae/>\n";
@@ -240,8 +236,6 @@ public void testCreateVMFromSpecWithTopology4() {
240236
vmStr += "<uuid>b0f0a72d-7efb-3cad-a8ff-70ebf30b3af9</uuid>\n";
241237
vmStr += "<description>" + os + "</description>\n";
242238
vmStr += "<clock offset='utc'>\n";
243-
vmStr += "<timer name='kvmclock' >\n";
244-
vmStr += "</timer>\n";
245239
vmStr += "</clock>\n";
246240
vmStr += "<features>\n";
247241
vmStr += "<pae/>\n";
@@ -317,8 +311,6 @@ public void testCreateVMFromSpec() {
317311
vmStr += "<uuid>b0f0a72d-7efb-3cad-a8ff-70ebf30b3af9</uuid>\n";
318312
vmStr += "<description>" + os + "</description>\n";
319313
vmStr += "<clock offset='utc'>\n";
320-
vmStr += "<timer name='kvmclock' >\n";
321-
vmStr += "</timer>\n";
322314
vmStr += "</clock>\n";
323315
vmStr += "<features>\n";
324316
vmStr += "<pae/>\n";

0 commit comments

Comments
 (0)