From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id 5D93E1FF16B
	for <inbox@lore.proxmox.com>; Thu, 14 Nov 2024 16:09:58 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 5409934531;
	Thu, 14 Nov 2024 16:08:36 +0100 (CET)
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Date: Thu, 14 Nov 2024 16:07:41 +0100
Message-Id: <20241114150754.374376-15-f.ebner@proxmox.com>
X-Mailer: git-send-email 2.39.5
In-Reply-To: <20241114150754.374376-1-f.ebner@proxmox.com>
References: <20241114150754.374376-1-f.ebner@proxmox.com>
MIME-Version: 1.0
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.055 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 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
Subject: [pve-devel] [PATCH qemu-server v4 14/27] module config: load nbd
 module at boot
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

Adapt the existing modules-load.d configuration, to also include the
'nbd' kernel module. By default, it is only possible to expose 16
NBDs, so add a modprobe.d configuration file as well, with a higher
limit, i.e. 128.

This is in preparation for supporting external backup providers,
giving them access to a QEMU block layer snapshot of the VM's disk
images that are exported as NBD devices and then exposed as regular
block devices.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---

New in v4.

 Makefile          | 1 +
 modprobe.conf     | 1 +
 modules-load.conf | 1 +
 3 files changed, 3 insertions(+)
 create mode 100644 modprobe.conf

diff --git a/Makefile b/Makefile
index 133468da..419b8c8e 100644
--- a/Makefile
+++ b/Makefile
@@ -70,6 +70,7 @@ install: $(PKGSOURCES)
 	install -m 0755 qm $(DESTDIR)$(SBINDIR)
 	install -m 0755 qmrestore $(DESTDIR)$(SBINDIR)
 	install -D -m 0644 modules-load.conf $(DESTDIR)/etc/modules-load.d/qemu-server.conf
+	install -D -m 0644 modprobe.conf $(DESTDIR)/etc/modprobe.d/qemu-server.conf
 	install -m 0755 qmextract $(DESTDIR)$(LIBDIR)
 	install -m 0644 qm.1 $(DESTDIR)/$(MAN1DIR)
 	install -m 0644 qmrestore.1 $(DESTDIR)/$(MAN1DIR)
diff --git a/modprobe.conf b/modprobe.conf
new file mode 100644
index 00000000..b9c973df
--- /dev/null
+++ b/modprobe.conf
@@ -0,0 +1 @@
+options nbd nbds_max=128
diff --git a/modules-load.conf b/modules-load.conf
index aee7d42a..0c6bdf14 100644
--- a/modules-load.conf
+++ b/modules-load.conf
@@ -1 +1,2 @@
+nbd
 vhost_net
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel