diff --git a/ceilometer/compute/virt/vmware/vsphere_operations.py b/ceilometer/compute/virt/vmware/vsphere_operations.py index 2531e1af..ed5c2e02 100644 --- a/ceilometer/compute/virt/vmware/vsphere_operations.py +++ b/ceilometer/compute/virt/vmware/vsphere_operations.py @@ -206,7 +206,8 @@ class VsphereOperations(object): query_spec.intervalId = VC_REAL_TIME_SAMPLING_INTERVAL # We query all samples which are applicable over the specified duration samples_cnt = (int(duration / VC_REAL_TIME_SAMPLING_INTERVAL) - if duration else 1) + if duration and + duration >= VC_REAL_TIME_SAMPLING_INTERVAL else 1) query_spec.maxSample = samples_cnt perf_manager = session.vim.service_content.perfManager