From 356acc6c2115a561d6cff9f84af8ddaaa4e4395c Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 16 Nov 2023 21:44:59 +0100 Subject: [PATCH 1/3] docs: Multiple disk support --- readme.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/readme.md b/readme.md index 790cf3b..4fb00e0 100644 --- a/readme.md +++ b/readme.md @@ -80,6 +80,30 @@ docker run -it --rm -e "BOOT=http://www.example.com/image.iso" --device=/dev/kvm Replace the example path `/home/user/data` with the desired storage folder. + * ### How do I add multiple disks? + + To add multiple disks, modify your compose file like this: + + ```yaml + environment: + DISK2_SIZE: "32G" + DISK3_SIZE: "64G" + volumes: + - /home/example2:/storage2 + - /home/example3:/storage3 + ``` + + Additionally, it's also possible to passthrough raw disk devices like this: + + ```yaml + environment: + DEVICE2: "/dev/vdc1" + DEVICE3: "/dev/vdc2" + devices: + - /dev/vdc1 + - /dev/vdc2 + ``` + * ### How do I increase the amount of CPU or RAM? By default, a single core and 512 MB of RAM are allocated to the container. To increase this, add the following environment variables: From cf7851984904a7efc923c5404d5bf1bd178363ff Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 16 Nov 2023 21:47:31 +0100 Subject: [PATCH 2/3] fix: Skip if bootdisk present --- src/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/install.sh b/src/install.sh index 1aa1782..e01bf9c 100644 --- a/src/install.sh +++ b/src/install.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash set -Eeuo pipefail +[ -f "$STORAGE/boot.img" ] && return 0 + TMP="/boot.img" rm -f "$TMP" From 745f5c589ce7954326936348963ced8d0b0e6a71 Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 16 Nov 2023 21:51:37 +0100 Subject: [PATCH 3/3] style: Tabs --- src/entry.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entry.sh b/src/entry.sh index ea46202..1853105 100755 --- a/src/entry.sh +++ b/src/entry.sh @@ -31,9 +31,9 @@ STORAGE="/storage" cd /run -. install.sh # Get bootdisk +. install.sh # Get bootdisk . disk.sh # Initialize disks -. network.sh # Initialize network +. network.sh # Initialize network KVM_ERR="" KVM_OPTS=""