Deploying VM from Generalized Image Using ARM Template

%3CLINGO-SUB%20id%3D%22lingo-sub-1531026%22%20slang%3D%22en-US%22%3EDeploying%20VM%20from%20Generalized%20Image%20Using%20ARM%20Template%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1531026%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3EHey%20Guys.%20I'm%20trying%20to%20deploy%20a%20VM%20from%20a%20generalized%20image%20using%20the%20ARM%20Template.%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%24storageaccount%20%3D%20%22caracas%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%24rgName%20%3D%20%22keyvault%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%24vhdUrl%20%3D%20%22%3CA%20href%3D%22https%3A%2F%2Fpolskadisks.blob.core.windows.net%2Fvhds%2FAruz20200627123424.vhd%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fpolskadisks.blob.core.windows.net%2Fvhds%2FAruz20200627123424.vhd%3C%2FA%3E%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eecho%20%22New-AzResourceGroupDeployment%20-Name%20%22dplisvvm%24postfix%22%20-ResourceGroupName%20%22%24rgName%22%20-TemplateFile%20%22VHDtoImage.json%22%20-userStorageAccountName%20%22%24storageaccount%22%20-dnsNameForPublicIP%20%22%24vmName%22%20-subscriptionId%20%22%24mysubid%22%20-location%20%22%24location%22%20-vmName%20%22%24vmName%22%20-vaultName%20%22%24kvname%22%20-vaultResourceGroup%20%22%24rgName%22%20-certificateUrl%20%3CA%20href%3D%22https%3A%2F%2Fvaulto.vault.azure.net%2Fkeys%2FArthur%2Fcf9ba64e6bb24adfa943ed9d5ab72ce0.Id%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fvaulto.vault.azure.net%2Fkeys%2FArthur%2Fcf9ba64e6bb24adfa943ed9d5ab72ce0.Id%3C%2FA%3E%20-vhdUrl%20%22%24vhdUrl%22%20-vmSize%20%22Standard%5C_A2%22%20-publicIPAddressName%20%22myPublicIP1%22%20-virtualNetworkName%20%22myVNET1%22%20-nicName%20%22myNIC1%22%20-adminUserName%20%22Aruzki19%22%20-adminPassword%20(%22Antwaynio97101%23%22%7CConvertTo-SecureString%20-AsPlainText%20-Force)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENew-AzResourceGroupDeployment%20-Name%20%22dplisvvm%24postfix%22%20-ResourceGroupName%20%22%24rgName%22%20-TemplateFile%20%22VHDtoImage.json%22%20-userStorageAccountName%20%22%24storageaccount%22%20-dnsNameForPublicIP%20%22%24vmName%22%20-subscriptionId%20%22%24mysubid%22%20-location%20%22%24location%22%20-vmName%20%22%24vmName%22%20-vaultName%20%22%24kvname%22%20-vaultResourceGroup%20%22%24rgName%22%20-certificateUrl%20%3CA%20href%3D%22https%3A%2F%2Fvaulto.vault.azure.net%2Fkeys%2FArthur%2Fcf9ba64e6bb24adfa943ed9d5ab72ce0.Id%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fvaulto.vault.azure.net%2Fkeys%2FArthur%2Fcf9ba64e6bb24adfa943ed9d5ab72ce0.Id%3C%2FA%3E%20-vhdUrl%20%22%24vhdUrl%22%20-vmSize%20%22Standard%5C_A2%22%20-publicIPAddressName%20%22myPublicIP1%22%20-virtualNetworkName%20%22myVNET1%22%20-nicName%20%22myNIC1%22%20-adminUserName%20%22Aruzki19%22%20-adminPassword%20(%22Antwaynio97101%23%22%7CConvertTo-SecureString%20-AsPlainText%20-Force)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EAfter%20running%20this%20command%20recommended%20from%20Microsoft%2C%20I've%20encountered%20the%20error%20message%20below%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23FF0000%22%3ENew-AzResourceGroupDeployment%3A%203%3A31%3A13%20PM%20-%20Error%3A%20Code%3DInvalidRequestContent%3B%20Message%3DThe%20request%20content%20was%20invalid%20and%20could%20not%20be%20deserialized%3A%20'Error%20convertingvalue%20%22caracas%22%20to%20type%20'Microsoft.WindowsAzure.ResourceStack.Frontdoor.Common.Entities.TemplateParameterType'.%20Path%20''%2C%20line%208%2C%20position%2027.'.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23FF0000%22%3ENew-AzResourceGroupDeployment%3A%20The%20deployment%20validation%20failed%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1531026%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
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