sovereign-stack/deployment/provision_lxc.sh

19 lines
504 B
Bash
Raw Normal View History

#!/bin/bash
2022-10-29 15:34:17 +00:00
set -eu
2022-07-27 16:38:33 +00:00
cd "$(dirname "$0")"
2022-07-27 16:38:33 +00:00
./stub_lxc_profile.sh "$LXD_VM_NAME"
# now let's create a new VM to work with.
lxc init --profile="$LXD_VM_NAME" "$VM_NAME" "$LXD_VM_NAME" --vm
# let's PIN the HW address for now so we don't exhaust IP
# and so we can set DNS internally.
lxc config set "$LXD_VM_NAME" "volatile.enp5s0.hwaddr=$MAC_ADDRESS_TO_PROVISION"
lxc config device override "$LXD_VM_NAME" root size="${ROOT_DISK_SIZE_GB}GB"
lxc start "$LXD_VM_NAME"
2022-07-27 16:38:33 +00:00
./wait_for_lxc_ip.sh "$LXD_VM_NAME"