Question

garynguyen on Tue, 14 Feb 2017 19:18:59


We have deadline to create environment on DevTest Lab. It's frustrated that there are not alot of blog/example out there to show us how to create a VM from custom Image in an existing lab. I start with those ARM templates on GIT hub in here to spin up a VM from custom image. 'https://github.com/Azure/azure-devtestlab/tree/master/ARMTemplates/101-dtl-create-vm-username-pwd-customimage' Of course, out of the box won't work for us because I need to modify the network ID/Name which we created as the tunnel connect back to our VPN.

The Powershell script and ARM templates are here: https://github.com/mitchellalm/azure-devtestlab-mitchellam/tree/master/Templates/DemandManagerEnvironment

I keep getting the follow error: New-AzureRmResourceGroupDeployment : 10:48:39 AM - Resource Microsoft.DevTestLab/labs/virtualMachines 'GaryTestLab/MyVM1pwdcus' failed with message '{ 'error': { 'code': 'ParentResourceNotFound', 'message': 'Can not perform requested operation on nested resource. Parent resource 'GaryTestLab' not found.' } }' At C:\\Users\\cn101028\\Source\\Reposs\\azure-devtestlab-mitchellam\\Scripts\\ProvisionDemoLab.ps1:45 char:1 + New-AzureRmResourceGroupDeployment -Name $uniqueName -ResourceGroupNa ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet New-AzureRmResourceGroupDeployment : 10:48:39 AM - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details. At C:\\Users\\cn101028\\Source\\Reposs\\azure-devtestlab-mitchellam\\Scripts\\ProvisionDemoLab.ps1:45 char:1 + New-AzureRmResourceGroupDeployment -Name $uniqueName -ResourceGroupNa ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet New-AzureRmResourceGroupDeployment : 10:48:39 AM - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details. At C:\\Users\\cn101028\\Source\\Reposs\\azure-devtestlab-mitchellam\\Scripts\\ProvisionDemoLab.ps1:45 char:1 + New-AzureRmResourceGroupDeployment -Name $uniqueName -ResourceGroupNa ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet


Sponsored



Replies

Loydon Mendonca on Wed, 15 Feb 2017 10:12:29


Which is the resource group you have mentioned in the script? The error does suggest that the error boils down to the parent resource group name. Check https://social.msdn.microsoft.com/Forums/en-US/94dea2c0-3d96-41fd-a991-271d03d41df2/newazurermresourcegroupdeployment-fails-with-parentresourcenotfound?forum=AzureDevTestLabs for a similar question.