qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block: inactivate all if started in paused mode
@ 2017-12-18 15:55 Vladimir Sementsov-Ogievskiy
  0 siblings, 0 replies; only message in thread
From: Vladimir Sementsov-Ogievskiy @ 2017-12-18 15:55 UTC (permalink / raw)
  To: qemu-devel, qemu-block; +Cc: kwolf, mreitz, den, vsementsov, pbonzini

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-18 15:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-18 15:55 [Qemu-devel] [PATCH] block: inactivate all if started in paused mode Vladimir Sementsov-Ogievskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).