Added MAC ADDRESS pinning.
Signed-off-by: Derek Smith <derek@farscapian.com>
This commit is contained in:
parent
2c5ca80fcf
commit
fb38fe23e6
@ -135,3 +135,7 @@ export NEXTCLOUD_DB_IMAGE="$DEFAULT_DB_IMAGE"
|
||||
|
||||
export GITEA_IMAGE="gitea/gitea:latest"
|
||||
export GITEA_DB_IMAGE="$DEFAULT_DB_IMAGE"
|
||||
|
||||
export WWW_MAC_ADDRESS=
|
||||
export BTCPAY_MAC_ADDRESS=
|
||||
export UMBREL_MAC_ADDRESS=
|
@ -60,6 +60,11 @@ elif [ "$VPS_HOSTING_TARGET" = lxd ]; then
|
||||
export RUN_BACKUP=false
|
||||
|
||||
# create a base image if needed and instantiate a VM.
|
||||
if [ -z "$MAC_ADDRESS_TO_PROVISION" ]; then
|
||||
echo "ERROR: You MUST define a MAC Address for all your machines."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
./provision_lxc.sh
|
||||
fi
|
||||
|
||||
|
@ -109,6 +109,7 @@ if ! lxc image list --format csv "$VM_NAME" | grep -q "$VM_NAME"; then
|
||||
|
||||
# let's PIN the HW address for now so we don't exhaust IP
|
||||
# and so we can set DNS internally.
|
||||
|
||||
lxc config set "$VM_NAME" "volatile.enp5s0.hwaddr=$MAC_ADDRESS_TO_PROVISION"
|
||||
|
||||
lxc start "$VM_NAME"
|
||||
|
Loading…
Reference in New Issue
Block a user