summaryrefslogtreecommitdiffstats
path: root/functions.sh
diff options
context:
space:
mode:
authorVictor Morales <v.morales@samsung.com>2020-07-31 13:02:54 -0400
committerVictor Morales <v.morales@samsung.com>2020-08-17 17:33:28 -0400
commit413f63bbe12db16f55ca7f4dd1c3663b8a112cae (patch)
treeacf1e264bae6a15410a3aa4bffa479d6e7aaa6ea /functions.sh
parent28d1cee5c7b95ae905a4481245d5d5650c87e101 (diff)
Set Jumpbox root's password
Every OS has different root's passwords which complicates the throubleshooting process. This change sets the root password of the jumpbox to what's defined in the ROOT_PASSWORD env variable. Signed-off-by: Victor Morales <v.morales@samsung.com> Change-Id: I7b926f9500de9341a660b86ccb1c9eafbfaf6053
Diffstat (limited to 'functions.sh')
-rwxr-xr-xfunctions.sh3
1 files changed, 2 insertions, 1 deletions
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 \