Merge "Set Jumpbox root's password"
authorGeorg Kunz <georg.kunz@est.tech>
Tue, 18 Aug 2020 20:28:18 +0000 (20:28 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 18 Aug 2020 20:28:18 +0000 (20:28 +0000)
deploy.env
functions.sh

index 602dfd8..07d1bf3 100644 (file)
@@ -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
index b0baf2d..5c37843 100755 (executable)
@@ -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 \