Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
The problem has been resolved after clearing out the SSH public keys before re-installing my resources.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I am using following script to provision resources.
*#!/bin/bash
resourceGroup="acdnd-c4-project"
location="westus2"
osType="UbuntuLTS"
vmssName="udacity-vmss"
adminName="udacityadmin"
storageAccount="udacitydiag081"
bePoolName="$vmssName-bepool"
lbName="$vmssName-lb"
lbRule="$lbName-network-rule"
nsgName="$vmssName-nsg"
vnetName="$vmssName-vnet"
subnetName="$vnetName-subnet"
probeName="tcpProbe"
vmSize="Standard_B1ls"
storageType="Standard_LRS"
echo "Creating resource group $resourceGroup..."
az group create \
--name $resourceGroup \
--location $location \
--verbose
echo "Resource group created: $resourceGroup"
echo "Creating storage account $storageAccount"
az storage account create \
--name $storageAccount \
--resource-group $resourceGroup \
--location $location \
--sku Standard_LRS
echo "Storage account created: $storageAccount"
echo "Creating network security group $nsgName"
az network nsg create \
--resource-group $resourceGroup \
--name $nsgName \
--verbose
echo "Network security group created: $nsgName"
echo "Creating VM scale set $vmssName"
az vmss create \
--resource-group $resourceGroup \
--name $vmssName \
--image $osType \
--vm-sku $vmSize \
--nsg $nsgName \
--subnet $subnetName \
--vnet-name $vnetName \
--backend-pool-name $bePoolName \
--storage-sku $storageType \
--load-balancer $lbName \
--custom-data cloud-init.txt \
--upgrade-policy-mode automatic \
--admin-username $adminName \
--generate-ssh-keys \
--verbose
echo "VM scale set created: $vmssName"
echo "Associating NSG: $nsgName with subnet: $subnetName"
az network vnet subnet update \
--resource-group $resourceGroup \
--name $subnetName \
--vnet-name $vnetName \
--network-security-group $nsgName \
--verbose
echo "NSG: $nsgName associated with subnet: $subnetName"
echo "Creating health probe $probeName"
az network lb probe create \
--resource-group $resourceGroup \
--lb-name $lbName \
--name $probeName \
--protocol tcp \
--port 80 \
--interval 5 \
--threshold 2 \
--verbose
echo "Health probe created: $probeName"
echo "Creating network load balancer rule $lbRule"
az network lb rule create \
--resource-group $resourceGroup \
--name $lbRule \
--lb-name $lbName \
--probe-name $probeName \
--backend-pool-name $bePoolName \
--backend-port 80 \
--frontend-ip-name loadBalancerFrontEnd \
--frontend-port 80 \
--protocol tcp \
--verbose
echo "Network load balancer rule created: $lbRule"
echo "Adding port 80 to NSG $nsgName"
az network nsg rule create \
--resource-group $resourceGroup \
--nsg-name $nsgName \
--name Port_80 \
--destination-port-ranges 80 \
--direction Inbound \
--priority 100 \
--verbose
echo "Port 80 added to NSG: $nsgName"
echo "Adding port 22 to NSG $nsgName"
az network nsg rule create \
--resource-group $resourceGroup \
--nsg-name $nsgName \
--name Port_22 \
--destination-port-ranges 22 \
--direction Inbound \
--priority 110 \
--verbose
echo "Port 22 added to NSG: $nsgName"
echo "VMSS script completed!"*
after provisioning when I try to enable "Insights" under my "udacity-vmss" it gives error as "Can not perform requested operation on nested resource. Parent resource 'udaloganalytics' not found. (Code: ParentResourceNotFound)"
I tried deleting resources & reinstalling it multiple time, but always getting same error.
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
Answer accepted by question author
The problem has been resolved after clearing out the SSH public keys before re-installing my resources.
@shaswat anand Sorry for the inconvenience caused due to this.
There are 2 pre-requisites when you want to enable azure monitor insights for your VM/VMSS:
This can also happen if the workspace is deleted. Can you please check if the workspace 'udaloganalytics' exist or it is deleted?
Here is the article on recovering you log analytics workspace with steps:
https://learn.microsoft.com/en-us/azure/azure-monitor/platform/delete-workspace
Let me know if everything mentioned above is correctly set up and I can help troubleshoot further.