Message ID | 1675795847-235232-1-git-send-email-steven.sistare@oracle.com |
---|---|
State | New |
Headers | show |
Series | [V2,01/20] migration: fix populate_vfio_info | expand |
diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py index ef94dcf..557209a 100644 --- a/python/qemu/machine/machine.py +++ b/python/qemu/machine/machine.py @@ -501,6 +501,16 @@ def _close_qmp_connection(self) -> None: finally: self._qmp_connection = None + def reopen_qmp_connection(self) -> None: + """Close and re-open the QMP connection.""" + 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.