diff --git a/lib/backend.py b/lib/backend.py index 6f294d934190b609a9b3f7641de24d26bdb5754d..9a6b5e5cc7f4700d8da6ba1d4c5e1357201e5a03 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -502,14 +502,16 @@ def GetAllInstancesInfo(hypervisor_list): iinfo = hypervisor.GetHypervisor(hname).GetAllInstancesInfo() if iinfo: for name, inst_id, memory, vcpus, state, times in iinfo: - if name in output: - raise errors.HypervisorError("Instance %s running duplicate" % name) - output[name] = { + value = { 'memory': memory, 'vcpus': vcpus, 'state': state, 'time': times, } + if name in output and output[name] != value: + raise errors.HypervisorError("Instance %s running duplicate" + " with different parameters" % name) + output[name] = value return output