Skip to content

Refactor autostart of machines

Juan Quintela qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Delay sighandler_setup()vl.c+5 -50 replies
2/6We want to autostart on incoming conections Once there, indent surrounded code in qemu stylevl.c+2 -43 replies
3/6split do_loadvm() into do_loadvm() and load_vmstate()savevm.c sysemu.h vl.c+15 -100 replies
4/6move do_loadvm() to monitor.cmonitor.c savevm.c sysemu.h+11 -120 replies
5/6make load_vmstate() return errorsmonitor.c savevm.c sysemu.h +1 more+14 -100 replies
6/6Continue a migrated vm is a bad ideamigration.c monitor.c sysemu.h +1 more+9 -03 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/6] Refactor autostart of machines

Hi
This series add several things:
- delay sighandler_setup(). Current code hangs until you are using telnet:....,server for instance. With this change, ^C while waiting for telnet program to conect will kill the vm.

- refactor autostart behaviour:
* incoming migration: depend of -S parameter
* loadvm from command line: depend of -S parameter
* loadvm from monitor: same state that the vm it replaces
* no loadvm no incoming: depend of -S parameter I tested, and all combinations works this way.

- refactor do_loadvm(). do_loadvm() don't return errors, if there were any error while loading a vm, it would obey autostart value independently of the errors. Now it will never start a vm that had erros while loading.

- if you type "cont" in the monitor of one machine just migrated, qemu will proceed with the start, with the consequent corruption. Last patch forbides to continue a vm that has just been migrated with an error message. If you load a new vm, flag is reset. This "bug/feature" was reported as a bug by users.

One comment:
- Is there really a good idea to allow loadvm in the monitor even if the current vm is running? I think that allowing loadvm command to only works when vm is stopped is a better idea. what does everybody else thinks?

Comments?

Later, Juan.

Juan Quintela (6):
Delay sighandler_setup()
We want to autostart on incoming conections Once there, indent
surrounded code in qemu style
split do_loadvm() into do_loadvm() and load_vmstate() move do_loadvm() to monitor.c
make load_vmstate() return errors
Continue a migrated vm is a bad idea

 migration.c |    1 +
 monitor.c   |   16 ++++++++++++++++
 savevm.c    |   19 +++++++------------
 sysemu.h    |    3 ++-
 vl.c        |   24 +++++++++++++-----------
 5 files changed, 39 insertions(+), 24 deletions(-)