From ba0c3eec6e8afb83d881a8fa186d82c86198a893 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 6 May 2023 15:24:34 +0200 Subject: [PATCH 01/11] Tag URL --- readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 4513ceb..ef3f718 100644 --- a/readme.md +++ b/readme.md @@ -5,12 +5,13 @@
[![Build]][build_url] -[![Version]][build_url] -[![Size]][hub_url] +[![Version]][tag_url] +[![Size]][tag_url] [![Pulls]][hub_url] [build_url]: https://github.com/kroese/virtual-dsm/ [hub_url]: https://hub.docker.com/r/kroese/virtual-dsm +[tag_url]: https://hub.docker.com/r/kroese/virtual-dsm/tags [Build]: https://github.com/kroese/virtual-dsm/actions/workflows/build.yml/badge.svg [Size]: https://img.shields.io/docker/image-size/kroese/virtual-dsm/latest?color=066da5&label=size From 0487eafabb2fe8f3fd7c95da23c5153c8072d064 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 6 May 2023 16:03:16 +0200 Subject: [PATCH 02/11] Support vhost in NAT mode --- run/network.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/run/network.sh b/run/network.sh index ca1c147..9c2cf69 100644 --- a/run/network.sh +++ b/run/network.sh @@ -144,10 +144,7 @@ configureNAT () { NET_OPTS="-netdev tap,ifname=${VM_NET_TAP},script=no,downscript=no,id=hostnet0" { exec 40>>/dev/vhost-net; rc=$?; } || : - - if (( rc == 0 )); then - NET_OPTS="$NET_OPTS,vhost=on,vhostfd=40" - fi + (( rc == 0 )) && NET_OPTS="$NET_OPTS,vhost=on,vhostfd=40" # Build DNS options from container /etc/resolv.conf From 0e4253ae5dd198e3ee8062decf426519fb651e55 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 6 May 2023 19:56:38 +0200 Subject: [PATCH 03/11] Allocation --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index ef3f718..83a7bd6 100644 --- a/readme.md +++ b/readme.md @@ -66,7 +66,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti ``` environment: - DISK_SIZE: "16G" + DISK_SIZE: "256G" ``` * ### How do I change the location of the virtual disk? @@ -87,7 +87,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti ALLOCATE: "N" ``` - Keep in mind that this doesn't affect any existing disks, and that it may impact performance as the image file will need to grow each time new data is added. + Keep in mind that this doesn't affect any of your existing disks unless they are resized. * ### How do I increase the amount of CPU/RAM? From adb1104e17dd2a59df0a5d24cab5159e4f777385 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 6 May 2023 20:14:54 +0200 Subject: [PATCH 04/11] Allocate --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 83a7bd6..36249de 100644 --- a/readme.md +++ b/readme.md @@ -87,7 +87,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti ALLOCATE: "N" ``` - Keep in mind that this doesn't affect any of your existing disks unless they are resized. + Keep in mind that this will affect new disks only, not any of your existing disks. * ### How do I increase the amount of CPU/RAM? From 9b8aea32898316c89b362a521ca8c627011c467d Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 6 May 2023 20:17:34 +0200 Subject: [PATCH 05/11] Allocate --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 36249de..8abdcbf 100644 --- a/readme.md +++ b/readme.md @@ -87,7 +87,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti ALLOCATE: "N" ``` - Keep in mind that this will affect new disks only, not any of your existing disks. + Keep in mind that this will not affect any of your existing disks, it only applies to newly created disks. * ### How do I increase the amount of CPU/RAM? From 1b32d54a8849e1a5c89092c733d6bd0927825004 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 6 May 2023 20:27:52 +0200 Subject: [PATCH 06/11] Allocate --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 8abdcbf..e87c6f7 100644 --- a/readme.md +++ b/readme.md @@ -80,7 +80,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti * ### How do I change the space reserved by the virtual disk? - By default, the entire disk space is reserved in advance. To reserve only the space actually used by the disk, add the following environment variable: + By default, the entire disk space is reserved in advance. To reserve only space as soon as it is really used, add the following environment variable: ``` environment: From e7c008b376ef71202e4c7f7857a471465a1bc6b1 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 6 May 2023 20:30:47 +0200 Subject: [PATCH 07/11] Allocation --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index e87c6f7..1555989 100644 --- a/readme.md +++ b/readme.md @@ -80,7 +80,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti * ### How do I change the space reserved by the virtual disk? - By default, the entire disk space is reserved in advance. To reserve only space as soon as it is really used, add the following environment variable: + By default, the entire disk space is reserved in advance. To create a growable disk, that only reserves the space actually used, add the following environment variable: ``` environment: From bead87ae4b214af8e573b1614b9bfb0142b93f2c Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 6 May 2023 20:34:14 +0200 Subject: [PATCH 08/11] Allocate --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 1555989..6e70455 100644 --- a/readme.md +++ b/readme.md @@ -80,7 +80,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti * ### How do I change the space reserved by the virtual disk? - By default, the entire disk space is reserved in advance. To create a growable disk, that only reserves the space actually used, add the following environment variable: + By default, the entire disk space is reserved in advance. To create a growable disk, that only reserves the space that is actually used, add the following environment variable: ``` environment: From e2508305925e0a865307371d15b67e234c87f7bd Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 6 May 2023 20:40:26 +0200 Subject: [PATCH 09/11] Disk location --- readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 6e70455..293baed 100644 --- a/readme.md +++ b/readme.md @@ -71,13 +71,15 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti * ### How do I change the location of the virtual disk? - To change the virtual disk's location from the default docker volume, include the following bind mount in your compose file and replace the path `/home/user/data` with the desired storage folder: + To change the virtual disk's location from the default docker volume, include the following bind mount in your compose file: ``` volumes: - /home/user/data:/storage ``` + Replace the example path `/home/user/data` with the desired storage folder. + * ### How do I change the space reserved by the virtual disk? By default, the entire disk space is reserved in advance. To create a growable disk, that only reserves the space that is actually used, add the following environment variable: From ad1ab7bd94e02a169e761a205ccf78135c59cd2e Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 6 May 2023 20:58:02 +0200 Subject: [PATCH 10/11] DHCP --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 293baed..25e3262 100644 --- a/readme.md +++ b/readme.md @@ -150,7 +150,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti * ### How can the container acquire an IP address via DHCP? - After configuring the container for macvlan (see above), add the following lines to your compose file: + After configuring the container for macvlan (see above), it will now be able to join your home network by requesting an IP from your router, just like your other devices. To enable this, add the following lines to your compose file: ``` environment: From 8ef45509b666db0c96a901139e6edb0bb82671df Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 6 May 2023 21:02:50 +0200 Subject: [PATCH 11/11] DHCP --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 25e3262..33024c0 100644 --- a/readme.md +++ b/readme.md @@ -148,7 +148,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti Please note that this IP address won't be accessible from the Docker host due to the design of macvlan, which doesn't permit communication between the two. If this is a concern, there are some workarounds available, but they go beyond the scope of this FAQ. - * ### How can the container acquire an IP address via DHCP? + * ### How can the container acquire an IP address from my router? After configuring the container for macvlan (see above), it will now be able to join your home network by requesting an IP from your router, just like your other devices. To enable this, add the following lines to your compose file: