Revision 2a2d087a
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
1680 | 1680 |
self._SaveKVMRuntime(instance, kvm_runtime) |
1681 | 1681 |
self._ExecuteKVMRuntime(instance, kvm_runtime, kvmhelp) |
1682 | 1682 |
|
1683 |
def _CallMonitorCommand(self, instance_name, command): |
|
1683 |
def _CallMonitorCommand(self, instance_name, command, timeout=None):
|
|
1684 | 1684 |
"""Invoke a command on the instance monitor. |
1685 | 1685 |
|
1686 | 1686 |
""" |
1687 |
if timeout is not None: |
|
1688 |
timeout_cmd = "timeout %s" % (timeout, ) |
|
1689 |
else: |
|
1690 |
timeout_cmd = "" |
|
1691 |
|
|
1687 | 1692 |
# TODO: Replace monitor calls with QMP once KVM >= 0.14 is the minimum |
1688 | 1693 |
# version. The monitor protocol is designed for human consumption, whereas |
1689 | 1694 |
# QMP is made for programmatic usage. In the worst case QMP can also |
Also available in: Unified diff