Deploying VM from Generalized Image Using ARM Template

Highlighted
New Contributor

Hey Guys. I'm trying to deploy a VM from a generalized image using the ARM Template. 

 

$storageaccount = "caracas"

 

$rgName = "keyvault"

 

$vhdUrl = "https://polskadisks.blob.core.windows.net/vhds/Aruz20200627123424.vhd"

 

echo "New-AzResourceGroupDeployment -Name "dplisvvm$postfix" -ResourceGroupName "$rgName" -TemplateFile "VHDtoImage.json" -userStorageAccountName "$storageaccount" -dnsNameForPublicIP "$vmName" -subscriptionId "$mysubid" -location "$location" -vmName "$vmName" -vaultName "$kvname" -vaultResourceGroup "$rgName" -certificateUrl https://vaulto.vault.azure.net/keys/Arthur/cf9ba64e6bb24adfa943ed9d5ab72ce0.Id -vhdUrl "$vhdUrl" -vmSize "Standard\_A2" -publicIPAddressName "myPublicIP1" -virtualNetworkName "myVNET1" -nicName "myNIC1" -adminUserName "Aruzki19" -adminPassword ("Antwaynio97101#"|ConvertTo-SecureString -AsPlainText -Force)

 

New-AzResourceGroupDeployment -Name "dplisvvm$postfix" -ResourceGroupName "$rgName" -TemplateFile "VHDtoImage.json" -userStorageAccountName "$storageaccount" -dnsNameForPublicIP "$vmName" -subscriptionId "$mysubid" -location "$location" -vmName "$vmName" -vaultName "$kvname" -vaultResourceGroup "$rgName" -certificateUrl https://vaulto.vault.azure.net/keys/Arthur/cf9ba64e6bb24adfa943ed9d5ab72ce0.Id -vhdUrl "$vhdUrl" -vmSize "Standard\_A2" -publicIPAddressName "myPublicIP1" -virtualNetworkName "myVNET1" -nicName "myNIC1" -adminUserName "Aruzki19" -adminPassword ("Antwaynio97101#"|ConvertTo-SecureString -AsPlainText -Force)

 

 

After running this command recommended from Microsoft, I've encountered the error message below:

 

New-AzResourceGroupDeployment: 3:31:13 PM - Error: Code=InvalidRequestContent; Message=The request content was invalid and could not be deserialized: 'Error convertingvalue "caracas" to type 'Microsoft.WindowsAzure.ResourceStack.Frontdoor.Common.Entities.TemplateParameterType'. Path '', line 8, position 27.'.

New-AzResourceGroupDeployment: The deployment validation failed

0 Replies