From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 8A43991C84 for ; Fri, 23 Dec 2022 14:10:48 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 727EB25DC2 for ; Fri, 23 Dec 2022 14:10:48 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 23 Dec 2022 14:10:47 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 5E47E44138 for ; Fri, 23 Dec 2022 14:10:47 +0100 (CET) From: Markus Frank To: pve-devel@lists.proxmox.com Date: Fri, 23 Dec 2022 14:10:02 +0100 Message-Id: <20221223131007.130310-2-m.frank@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221223131007.130310-1-m.frank@proxmox.com> References: <20221223131007.130310-1-m.frank@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.038 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [qemu.org, linux-kvm.org, gitlab.io] Subject: [pve-devel] [PATCH docs v2 1/6] added shared filesystem doc for virtio-fs & virtio-9p X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2022 13:10:48 -0000 Signed-off-by: Markus Frank --- qm.adoc | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/qm.adoc b/qm.adoc index 45ec17f..9a687f8 100644 --- a/qm.adoc +++ b/qm.adoc @@ -932,6 +932,67 @@ recommended to always use a limiter to avoid guests using too many host resources. If desired, a value of '0' for `max_bytes` can be used to disable all limits. +[[qm_sharedfiles]] +Shared Filesystems +~~~~~~~~~~~~~~~~~~ + +add directories for Shared Filesystems +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +To add a directory either add a directory to the "Shared Files" list in the node +config in the WebUI or add it to the /etc/pve/nodes//dirs config file +like this: + +---- +: /path/to/share +---- + +9pfs (virtio-9p) +^^^^^^^^^^^^^^^^ + +QEMU's 9pfs uses the Plan 9 Filesystem Protocol to share a directory on the host +with a guest VM. + +To share a directory with 9p, run the following command: + +---- +qm set -sharedfiles0 virtio-9p,dirid=,tag= +---- + +To mount QEMU's 9pfs in a guest VM with the Linux kernel 9p driver, run the +following command: + +---- +mount -t 9p -o trans=virtio,version=9p2000.L +---- + +https://www.linux-kvm.org/page/9p_virtio + +https://wiki.qemu.org/Documentation/9psetup + +virtio-fs +^^^^^^^^^ + +Virtio-fs is a shared file system, that enables sharing between host and +guest VM while taking advantage of the locality of virtual machines and the +hypervisor to get a higher throughput than 9p. +Numa must be disabled to use virtio-fs. + +To share a directory with virtio-fs, run the following command: + +---- +qm set -sharedfiles0 virtio-fs,dirid=,tag= +---- + +To mount virtio-fs in a guest VM with the Linux kernel virtiofs driver, run the +following command: + +---- +mount -t virtiofs +---- + +https://virtio-fs.gitlab.io/howto-qemu.html + [[qm_bootorder]] Device Boot Order ~~~~~~~~~~~~~~~~~ -- 2.30.2