From 976b5f613ba8a84cbc5890483e9614f7f966c4c5 Mon Sep 17 00:00:00 2001 From: spiritLHLS <103393591+spiritLHLS@users.noreply.github.com> Date: Wed, 15 Feb 2023 15:03:21 +0800 Subject: [PATCH] Create build_backend.sh --- build_backend.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 build_backend.sh diff --git a/build_backend.sh b/build_backend.sh new file mode 100644 index 0000000..ecf8dbd --- /dev/null +++ b/build_backend.sh @@ -0,0 +1,21 @@ +#!/bin/bash +#from https://github.com/spiritLHLS/pve + +# 创建网桥 +echo "Creating bridge vmbr1..." +cat <> /etc/network/interfaces.d/vmbr1.cfg +auto vmbr1 +iface vmbr1 inet static + address 192.168.1.1 + netmask 255.255.255.0 + bridge_ports enp0s8 + bridge_stp off + bridge_fd 0 +EOF +systemctl restart networking.service +echo "Bridge vmbr1 created!" + +# 创建资源池 +echo "Creating resource pool mypool..." +pvesh create /pools --poolid mypool +echo "Resource pool mypool created!"