Skip to content

Commit 36b9b7c

Browse files
author
Jessie Wang
committed
Update VM password signin to ssh
1 parent 54baefc commit 36b9b7c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

vhdbuilder/packer/test/run-test.sh

+3-7
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ if [ -z "${MANAGED_SIG_ID}" ]; then
1616
fi
1717
echo "SIG image version ID from packer output: ${MANAGED_SIG_ID}"
1818

19-
set +x
20-
TEST_VM_ADMIN_PASSWORD="TestVM@$(date +%s)"
21-
set -x
22-
2319
# For linux VHDs, override AZURE_LOCATION with PACKER_BUILD_LOCATION to make sure
2420
# we're in the correct region to access the image version from the staging gallery (PackerSigGalleryEastUS)
2521
if [ "${OS_TYPE,,}" == "linux" ]; then
@@ -92,7 +88,7 @@ if [ "${OS_TYPE,,}" == "linux" ]; then
9288
--name "$VM_NAME" \
9389
--image "$MANAGED_SIG_ID" \
9490
--admin-username "$TEST_VM_ADMIN_USERNAME" \
95-
--admin-password "$TEST_VM_ADMIN_PASSWORD" \
91+
--generate-ssh-keys \
9692
--nics "$TESTING_NIC_ID" \
9793
${TARGET_COMMAND_STRING}
9894
else
@@ -101,12 +97,12 @@ else
10197
--name "$VM_NAME" \
10298
--image "$MANAGED_SIG_ID" \
10399
--admin-username "$TEST_VM_ADMIN_USERNAME" \
104-
--admin-password "$TEST_VM_ADMIN_PASSWORD" \
100+
--generate-ssh-keys \
105101
--public-ip-address "" \
106102
${TARGET_COMMAND_STRING}
107103
fi
108104

109-
echo "VHD test VM username: $TEST_VM_ADMIN_USERNAME, password: $TEST_VM_ADMIN_PASSWORD"
105+
echo "VHD test VM username: $TEST_VM_ADMIN_USERNAME"
110106

111107
time az vm wait -g "$TEST_VM_RESOURCE_GROUP_NAME" -n "$VM_NAME" --created
112108
capture_benchmark "${SCRIPT_NAME}_create_test_vm"

0 commit comments

Comments
 (0)