From nobody Tue Oct 28 04:16:43 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513612644274846.8423400702408; Mon, 18 Dec 2017 07:57:24 -0800 (PST) Received: from localhost ([::1]:50794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQxmp-0001Pl-6x for importer@patchew.org; Mon, 18 Dec 2017 10:57:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQxl8-0000NF-Jj for qemu-devel@nongnu.org; Mon, 18 Dec 2017 10:55:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQxl7-0007pw-Qp for qemu-devel@nongnu.org; Mon, 18 Dec 2017 10:55:18 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:26288 helo=relay.sw.ru) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eQxl7-0007i7-6e for qemu-devel@nongnu.org; Mon, 18 Dec 2017 10:55:17 -0500 Received: from kvm.sw.ru (msk-vpn.virtuozzo.com [195.214.232.6]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id vBHH4aR1023017; Sun, 17 Dec 2017 20:04:37 +0300 (MSK) From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Mon, 18 Dec 2017 18:55:03 +0300 Message-Id: <20171218155503.7506-1-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.11.1 X-detected-operating-system: by eggs.gnu.org: OpenBSD 3.x [fuzzy] X-Received-From: 195.214.232.25 Subject: [Qemu-devel] [PATCH] block: inactivate all if started in paused mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, den@openvz.org, vsementsov@virtuozzo.com, pbonzini@redhat.com, mreitz@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- 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 ro= le of the disk. Is there any workaround or if not, what is a true way to implement this pos= sibility? 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(); } =20 os_setup_post(); --=20 2.11.1