diff --git a/lib/backend.py b/lib/backend.py index 831f36cf16dcbfa19f27f554f62c679e155b448b..18d439e869c08ff0f27edff13218e99dc81d7a6d 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -660,9 +660,14 @@ def GetAllInstancesInfo(hypervisor_list): 'state': state, 'time': times, } - if name in output and output[name] != value: - raise errors.HypervisorError("Instance %s running duplicate" - " with different parameters" % name) + if name in output: + # we only check static parameters, like memory and vcpus, + # and not state and time which can change between the + # invocations of the different hypervisors + for key in 'memory', 'vcpus': + if value[key] != output[name][key]: + raise errors.HypervisorError("Instance %s is running twice" + " with different parameters" % name) output[name] = value return output