dir partition
This commit is contained in:
@@ -47,7 +47,9 @@ function prepare_lxd {
|
|||||||
echo "bridge <lxdbr0> down, so initialization will use default preseed..."
|
echo "bridge <lxdbr0> down, so initialization will use default preseed..."
|
||||||
|
|
||||||
if [[ $(printenv container) == 'lxc' ]]; then
|
if [[ $(printenv container) == 'lxc' ]]; then
|
||||||
|
echo "--------------------------------"
|
||||||
echo "nested configuration applying..."
|
echo "nested configuration applying..."
|
||||||
|
echo "--------------------------------"
|
||||||
cat <<EOF | sg $NEW_GROUP -c 'lxd init --preseed'
|
cat <<EOF | sg $NEW_GROUP -c 'lxd init --preseed'
|
||||||
config: {}
|
config: {}
|
||||||
networks:
|
networks:
|
||||||
@@ -82,7 +84,9 @@ EOF
|
|||||||
else
|
else
|
||||||
empty_block_partition=$(lsblk -o NAME,FSTYPE,GROUP --noheadings -p | grep -E ^.─ | grep disk | awk '{if($3=="") print $1}' | cut -d'/' -f3)
|
empty_block_partition=$(lsblk -o NAME,FSTYPE,GROUP --noheadings -p | grep -E ^.─ | grep disk | awk '{if($3=="") print $1}' | cut -d'/' -f3)
|
||||||
if [[ -n "$empty_block_partition" ]]; then
|
if [[ -n "$empty_block_partition" ]]; then
|
||||||
|
echo "--------------------------------"
|
||||||
echo "use empty block partition /dev/$empty_block_partition for speed and optimization"
|
echo "use empty block partition /dev/$empty_block_partition for speed and optimization"
|
||||||
|
echo "--------------------------------"
|
||||||
cat <<EOF | sudo lxd init --preseed
|
cat <<EOF | sudo lxd init --preseed
|
||||||
config: {}
|
config: {}
|
||||||
networks:
|
networks:
|
||||||
@@ -117,7 +121,9 @@ cluster: null
|
|||||||
EOF
|
EOF
|
||||||
echo OK
|
echo OK
|
||||||
else
|
else
|
||||||
|
echo "--------------------------------"
|
||||||
echo "use dir partition for development purpose"
|
echo "use dir partition for development purpose"
|
||||||
|
echo "--------------------------------"
|
||||||
cat <<EOF | lxd init --preseed
|
cat <<EOF | lxd init --preseed
|
||||||
config: {}
|
config: {}
|
||||||
networks:
|
networks:
|
||||||
@@ -126,6 +132,21 @@ networks:
|
|||||||
config:
|
config:
|
||||||
ipv4.address: auto
|
ipv4.address: auto
|
||||||
ipv6.address: none
|
ipv6.address: none
|
||||||
|
profiles:
|
||||||
|
- config: {}
|
||||||
|
description: ""
|
||||||
|
devices:
|
||||||
|
eth0:
|
||||||
|
name: eth0
|
||||||
|
network: lxdbr0
|
||||||
|
type: nic
|
||||||
|
root:
|
||||||
|
path: /
|
||||||
|
pool: default
|
||||||
|
type: disk
|
||||||
|
name: default
|
||||||
|
projects: []
|
||||||
|
cluster: null
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user