Revision 546cdf7a lib/hypervisor/hv_kvm/__init__.py
b/lib/hypervisor/hv_kvm/__init__.py | ||
---|---|---|
870 | 870 |
try: |
871 | 871 |
qmp = QmpConnection(self._InstanceQmpMonitor(instance_name)) |
872 | 872 |
qmp.connect() |
873 |
vcpus = len(qmp.Execute("query-cpus")[qmp.RETURN_KEY])
|
|
873 |
vcpus = len(qmp.Execute("query-cpus")) |
|
874 | 874 |
# Will fail if ballooning is not enabled, but we can then just resort to |
875 | 875 |
# the value above. |
876 |
mem_bytes = qmp.Execute("query-balloon")[qmp.RETURN_KEY][qmp.ACTUAL_KEY]
|
|
876 |
mem_bytes = qmp.Execute("query-balloon")[qmp.ACTUAL_KEY] |
|
877 | 877 |
memory = mem_bytes / 1048576 |
878 | 878 |
except errors.HypervisorError: |
879 | 879 |
pass |
Also available in: Unified diff