[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH V9 41/46] python/machine: QEMUMachine reopen_qmp_connection
From: |
Steve Sistare |
Subject: |
[PATCH V9 41/46] python/machine: QEMUMachine reopen_qmp_connection |
Date: |
Tue, 26 Jul 2022 09:10:38 -0700 |
Provide reopen_qmp_connection() to reopen a closed monitor connection.
This is needed by cpr, because qemu exec closes the monitor socket.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
---
python/qemu/machine/machine.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py
index d05950e..60b934d 100644
--- a/python/qemu/machine/machine.py
+++ b/python/qemu/machine/machine.py
@@ -491,6 +491,15 @@ def _close_qmp_connection(self) -> None:
finally:
self._qmp_connection = None
+ def reopen_qmp_connection(self):
+ self._close_qmp_connection()
+ self._qmp_connection = QEMUMonitorProtocol(
+ self._monitor_address,
+ server=True,
+ nickname=self._name
+ )
+ self._qmp.accept(self._qmp_timer)
+
def _early_cleanup(self) -> None:
"""
Perform any cleanup that needs to happen before the VM exits.
--
1.8.3.1
- [PATCH V9 26/46] cpr: Mismatched GPAs fix, (continued)
- [PATCH V9 26/46] cpr: Mismatched GPAs fix, Steve Sistare, 2022/07/26
- [PATCH V9 37/46] chardev: cpr for simple devices, Steve Sistare, 2022/07/26
- [PATCH V9 38/46] chardev: cpr for pty, Steve Sistare, 2022/07/26
- [PATCH V9 32/46] vfio-pci: cpr part 2 (msi), Steve Sistare, 2022/07/26
- [PATCH V9 34/46] vfio-pci: recover from unmap-all-vaddr failure, Steve Sistare, 2022/07/26
- [PATCH V9 40/46] python/machine: QEMUMachine full_args, Steve Sistare, 2022/07/26
- [PATCH V9 17/46] migration: check mode in notifiers, Steve Sistare, 2022/07/26
- [PATCH V9 45/46] migration: notifier error reporting, Steve Sistare, 2022/07/26
- [PATCH V9 36/46] chardev: cpr framework, Steve Sistare, 2022/07/26
- [PATCH V9 41/46] python/machine: QEMUMachine reopen_qmp_connection,
Steve Sistare <=
- [PATCH V9 43/46] vl: start on wakeup request, Steve Sistare, 2022/07/26
- [PATCH V9 44/46] migration: fix suspended runstate, Steve Sistare, 2022/07/26
- [PATCH V9 42/46] tests/avocado: add cpr regression test, Steve Sistare, 2022/07/26
- [PATCH V9 46/46] vfio: allow cpr-reboot migration if suspended, Steve Sistare, 2022/07/26
- [PATCH V9 23/46] cpr: add exec-mode blockers, Steve Sistare, 2022/07/26
- [PATCH V9 09/46] cpr: reboot mode, Steve Sistare, 2022/07/26
- [PATCH V9 31/46] vfio-pci: cpr part 1 (fd and dma), Steve Sistare, 2022/07/26
- [PATCH V9 39/46] chardev: cpr for sockets, Steve Sistare, 2022/07/26