qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: kwolf@redhat.com, mreitz@redhat.com, den@openvz.org,
	vsementsov@virtuozzo.com, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH] block: inactivate all if started in paused mode
Date: Mon, 18 Dec 2017 18:55:03 +0300	[thread overview]
Message-ID: <20171218155503.7506-1-vsementsov@virtuozzo.com> (raw)

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

                 reply	other threads:[~2017-12-18 15:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171218155503.7506-1-vsementsov@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).