From patchwork Thu Sep 10 14:43:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 274030 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10D22C07548 for ; Thu, 10 Sep 2020 14:45:03 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 30F9921D6C for ; Thu, 10 Sep 2020 14:45:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZeCvxTI2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30F9921D6C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGNoq-00038s-Ub for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 10:45:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGNo5-0002LB-QU for qemu-devel@nongnu.org; Thu, 10 Sep 2020 10:44:13 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:48199 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGNo3-0001Vr-6K for qemu-devel@nongnu.org; Thu, 10 Sep 2020 10:44:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599749049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XGZNL9awis3P0yxQOl6hZwwUDTWbx0lpYTO5S2kTtmU=; b=ZeCvxTI2BMl/KzAOmjc2f4FD5PHFTzYo+hAgHK8oWn2qLZKixBhUXd3doIKvVwD/0cstQB tSkt9p3HATksrynaEJQsHYZbboFsYQ+HOCpXE+ivp8Znv27GJU+yMAmCJfQbG0UGieq7GZ J1UXg3bbJfAZCUHxj0er3/yQ8IZI4YY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-135-6XCKIbG-NJ26JQfVu2J4WA-1; Thu, 10 Sep 2020 10:44:05 -0400 X-MC-Unique: 6XCKIbG-NJ26JQfVu2J4WA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DE110100945B; Thu, 10 Sep 2020 14:44:04 +0000 (UTC) Received: from localhost (ovpn-113-198.ams2.redhat.com [10.36.113.198]) by smtp.corp.redhat.com (Postfix) with ESMTP id 479C91A914; Thu, 10 Sep 2020 14:44:01 +0000 (UTC) From: Stefan Hajnoczi To: qemu-devel@nongnu.org Subject: [PATCH v2 0/3] docs: add qemu-storage-daemon documentation Date: Thu, 10 Sep 2020 15:43:57 +0100 Message-Id: <20200910144400.69615-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=stefanha@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=stefanha@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 08:38:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , qemu-block@nongnu.org, Kashyap Chamarthy , afrosi@redhat.com, Laszlo Ersek , Markus Armbruster , Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" v2: * Drop block-core.json h2 header removal, add an h1 header to storage-daemon/qapi/qapi-schema.json instead [Kevin] * Add Examples section to man page [Kevin] Add documentation for the qemu-storage-daemon program and its QMP commands. The man page looks like this: QEMU-STORAGE-DAEMON(1) QEMU QEMU-STORAGE-DAEMON(1) NAME qemu-storage-daemon - QEMU storage daemon SYNOPSIS qemu-storage-daemon [options] DESCRIPTION qemu-storage-daemon provides disk image functionality from QEMU, qemu-img, and qemu-nbd in a long-running process controlled via QMP commands without running a virtual machine. It can export disk images over NBD, run block job operations, and perform other disk-related operations. The daemon is controlled via a QMP monitor socket and initial configuration from the command-line. The daemon offers the following subset of QEMU features: · Blockdev nodes · Block jobs · NBD server · Character devices · Crypto and secrets · QMP Commands can be sent over a QEMU Monitor Protocol (QMP) connection. See the qemu-storage-daemon-qmp-ref(7) manual page for a description of the commands. The daemon runs until it is stopped using the quit QMP command or SIGINT/SIGHUP/SIGTERM. Warning: Never modify images in use by a running virtual machine or any other process; this may destroy the image. Also, be aware that querying an image that is being modified by another process may encounter inconsistent state. OPTIONS Standard options: -h, --help Display this help and exit -V, --version Display version information and exit -T, --trace [[enable=]PATTERN][,events=FILE][,file=FILE] Specify tracing options. [enable=]PATTERN Immediately enable events matching PATTERN (either event name or a globbing pattern). This option is only available if QEMU has been compiled with the simple, log or ftrace tracing backend. To specify multiple events or patterns, specify the -trace option multiple times. Use -trace help to print a list of names of trace points. events=FILE Immediately enable events listed in FILE. The file must contain one event name (as listed in the trace-events-all file) per line; globbing patterns are accepted too. This option is only available if QEMU has been compiled with the simple, log or ftrace tracing backend. file=FILE Log output traces to FILE. This option is only available if QEMU has been compiled with the simple tracing backend. --blockdev BLOCKDEVDEF is a blockdev node definition. See the qemu(1) manual page for a description of blockdev node properties and the qemu-block-drivers(7) manual page for a description of driver-specific parameters. --chardev CHARDEVDEF is a character device definition. See the qemu(1) manual page for a description of character device properties. A common character device definition configures a UNIX domain socket: --chardev socket,id=char1,path=/tmp/qmp.sock,server,nowait --monitor MONITORDEF is a QMP monitor definition. See the qemu(1) manual page for a description of QMP monitor properties. A common QMP monitor definition configures a monitor on character device char1: --monitor chardev=char1 --nbd-server addr.type=inet,addr.host=,addr.port=[,tls-creds=][,tls-authz=] --nbd-server addr.type=unix,addr.path=[,tls-creds=][,tls-authz=] is a NBD server definition. Both TCP and UNIX domain sockets are supported. TLS encryption can be configured using --object tls-creds-* and authz-* secrets (see below). To configure an NBD server on UNIX domain socket path /tmp/nbd.sock: --nbd-server addr.type=unix,addr.path=/tmp/nbd.sock --object help --object ,help --object [,=...] is a QEMU user creatable object definition. List object types with help. List object properties with ,help. See the qemu(1) manual page for a description of the object properties. The most common object type is a secret, which is used to supply passwords and/or encryption keys. EXAMPLES Launch the daemon with QMP monitor socket qmp.sock so clients can execute QMP commands: $ qemu-storage-daemon \ --chardev socket,path=qmp.sock,server,nowait,id=char1 \ --monitor chardev=char1 Export raw image file disk.img over NBD UNIX domain socket nbd.sock: $ qemu-storage-daemon \ --blockdev driver=file,node-name=disk,filename=disk.img \ --nbd-server addr.type=unix,addr.path=nbd.sock \ --export type=nbd,device=disk,writable=on SEE ALSO qemu(1), qemu-block-drivers(7), qemu-storage-daemon-qmp-ref(7) COPYRIGHT 2020, The QEMU Project Developers 5.1.50 Sep 10, 2020 QEMU-STORAGE-DAEMON(1) Stefan Hajnoczi (3): docs: generate qemu-storage-daemon-qmp-ref(7) man page docs: add qemu-storage-daemon(1) man page MAINTAINERS: add Kevin Wolf as storage daemon maintainer MAINTAINERS | 9 ++ storage-daemon/qapi/qapi-schema.json | 4 + docs/interop/qemu-storage-daemon-qmp-ref.texi | 80 ++++++++++++ docs/tools/conf.py | 2 + docs/tools/index.rst | 1 + docs/tools/qemu-storage-daemon.rst | 121 ++++++++++++++++++ meson.build | 9 ++ storage-daemon/qapi/meson.build | 2 + 8 files changed, 228 insertions(+) create mode 100644 docs/interop/qemu-storage-daemon-qmp-ref.texi create mode 100644 docs/tools/qemu-storage-daemon.rst