mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
Allow monitor interaction when using migrate -exec
All, I've recently been playing around with migration via exec. Unfortunately, when starting the incoming qemu process with "-incoming exec:cmd", it suffers the same problem that -incoming tcp used to suffer; namely, that you can't interact with the monitor until after the migration has happened. This causes problems for libvirt usage of -incoming exec, since libvirt expects to be able to access the monitor ahead of time. This fairly simple patch allows you to access the monitor both before and after the migration has completed using exec. (note: developed/tested with qemu-kvm, but applies perfectly fine to qemu) Signed-off-by: Chris Lalancette <clalance@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
c16b5a2ca0
commit
8a43b1ea7f
3 changed files with 34 additions and 12 deletions
12
savevm.c
12
savevm.c
|
@ -244,7 +244,6 @@ QEMUFile *qemu_popen(FILE *popen_file, const char *mode)
|
|||
} else {
|
||||
s->file = qemu_fopen_ops(s, popen_put_buffer, NULL, popen_close, NULL, NULL);
|
||||
}
|
||||
fprintf(stderr, "qemu_popen: returning result of qemu_fopen_ops\n");
|
||||
return s->file;
|
||||
}
|
||||
|
||||
|
@ -260,6 +259,17 @@ QEMUFile *qemu_popen_cmd(const char *command, const char *mode)
|
|||
return qemu_popen(popen_file, mode);
|
||||
}
|
||||
|
||||
int qemu_popen_fd(QEMUFile *f)
|
||||
{
|
||||
QEMUFilePopen *p;
|
||||
int fd;
|
||||
|
||||
p = (QEMUFilePopen *)f->opaque;
|
||||
fd = fileno(p->popen_file);
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
QEMUFile *qemu_fopen_socket(int fd)
|
||||
{
|
||||
QEMUFileSocket *s = qemu_mallocz(sizeof(QEMUFileSocket));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue