Inactivate all if started in paused mode to make it possible to modify
drives through nbd before start (a kind of external reatore).
Invalidation should be done in qmp cont command.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
Hi all!
We need the following option: start vm in stopped mode (-S) and write it's disk before start through NBD.
It should be absolutely safe, but unfortunately it is disallowed by root role of the disk.
Is there any workaround or if not, what is a true way to implement this possibility?
error message:
unable to execute QEMU command 'nbd-server-add': Conflicts with use by drive0 as 'root', which does not allow 'write' on #block100
I'm not sure about, how to properly make this case possible, but here is a try.
vl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/vl.c b/vl.c
index 68782814e5..2ebef3953d 100644
--- a/vl.c
+++ b/vl.c
@@ -4727,6 +4727,8 @@ int main(int argc, char **argv, char **envp)
}
} else if (autostart) {
vm_start();
+ } else {
+ bdrv_inactivate_all();
}
os_setup_post();
--
2.11.1