summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Kunz <georg.kunz@est.tech>2020-08-18 20:28:18 +0000
committerGerrit Code Review <gerrit@opnfv.org>2020-08-18 20:28:18 +0000
commit64d786a3b13cddbff4b546605c0954666971e4de (patch)
tree18a8fcf3a411996569c4c8d3487e3c59f511162f
parent4ab14dcbf0bb1e37d25c086c27c8c1c48f8abfd0 (diff)
parent413f63bbe12db16f55ca7f4dd1c3663b8a112cae (diff)
Merge "Set Jumpbox root's password"
-rw-r--r--deploy.env1
-rwxr-xr-xfunctions.sh3
2 files changed, 3 insertions, 1 deletions
diff --git a/deploy.env b/deploy.env
index 602dfd8..07d1bf3 100644
--- a/deploy.env
+++ b/deploy.env
@@ -10,3 +10,4 @@ export BRIDGE=pxebr
export VM_NAME=$(yq r $CURRENTPATH/hw_config/$VENDOR/pdf.yaml jumphost.name)
export USERNAME=ubuntu
export PROJECT_ROOT="/home/ubuntu"
+export ROOT_PASSWORD="root" # This is used for throubleshooting purposes
diff --git a/functions.sh b/functions.sh
index b0baf2d..5c37843 100755
--- a/functions.sh
+++ b/functions.sh
@@ -46,7 +46,8 @@ EOL
# Create VM
sudo genisoimage -output "/var/lib/libvirt/images/$VM_NAME/$VM_NAME-cidata.iso" \
-volid cidata -joliet -rock user-data meta-data
-
+ sudo virt-customize -a "/var/lib/libvirt/images/$VM_NAME/$VM_NAME.qcow2" \
+ --root-password password:"$ROOT_PASSWORD"
sudo virt-install --connect qemu:///system --name "$VM_NAME" \
--ram 4096 --vcpus=4 --os-type linux --os-variant ubuntu16.04 \
--disk path="/var/lib/libvirt/images/$VM_NAME/$VM_NAME.qcow2",format=qcow2 \