Skip to content

Commit f8909ef

Browse files
authored
Enable nbd module in cloud-init (#54)
1 parent b6a8ad6 commit f8909ef

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

cloudformation/main.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ Resources:
9999
echo "agentless-scanning-${AWS::Region}" > /etc/hostname
100100
DD_API_KEY="${DatadogAPIKey}"
101101

102+
# Enable the nbd module
103+
modprobe nbd nbds_max=128
104+
echo "nbd" > /etc/modules-load.d/nbd.conf
105+
echo "options nbd nbds_max=128" > /etc/modprobe.d/nbd.conf
106+
102107
# Install requirements
103108
apt update
104109
apt install -y nbd-client

modules/user_data/templates/install.sh.tftpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ set -u
44
set -e
55
set -o pipefail
66

7+
# Enable the nbd module
8+
modprobe nbd nbds_max=128
9+
echo "nbd" > /etc/modules-load.d/nbd.conf
10+
echo "options nbd nbds_max=128" > /etc/modprobe.d/nbd.conf
11+
12+
# Install requirements
713
apt update
814
apt install -y nbd-client
915

0 commit comments

Comments
 (0)