Skip to content

Commit 64cc892

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

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

vhdbuilder/packer/test/run-test.sh

+4-8
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,14 @@ LINUX_SCRIPT_PATH="linux-vhd-content-test.sh"
88
WIN_CONFIGURATION_SCRIPT_PATH="generate-windows-vhd-configuration.ps1"
99
WIN_SCRIPT_PATH="windows-vhd-content-test.ps1"
1010
TEST_RESOURCE_PREFIX="vhd-test"
11-
TEST_VM_ADMIN_USERNAME="azureuser"
11+
TEST_VM_ADMIN_USERNAME="testadmin"
1212

1313
if [ -z "${MANAGED_SIG_ID}" ]; then
1414
echo "SIG image version ID from packer output is empty, unable to proceed..."
1515
exit 1
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, password: $TEST_VM_ADMIN_PASSWORD"
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)