Cannot complete: Exercise - Set up communication between IoT Hub and IoT Edge

Karol Adamiak 20 Reputation points
2025-04-08T13:45:44.86+00:00

I follow "Exercise - Set up communication between IoT Hub and IoT Edge", https://learn.microsoft.com/en-us/training/modules/deploy-prebuilt-module-edge-device/4-exercise-setup-communication

After executing command below, with replaced values:

az deployment group create --resource-group IoTEdgeResources --template-uri "https://aka.ms/iotedge-vm-deploy" --parameters dnsLabelPrefix='<REPLACE_WITH_VM_NAME>' --parameters adminUsername='azureuser' --parameters deviceConnectionString=$(az iot hub device-identity connection-string show --device-id myEdgeDevice --hub-name
<REPLACE_WITH_HUB_NAME> -o tsv) --parameters authenticationType='password' --parameters adminPasswordOrKey="<REPLACE_WITH_PASSWORD>"

I see following error:

{"code": "InvalidTemplateDeployment", "message": "The template deployment 'iotedge-vm-deploy' is not valid according to the validation procedure. The tracking id is 'e0fdc05b-2ac9-451b-af26-fe70ebf23cb0'. See inner errors for details."}
Inner Errors: 
{"code": "SkuNotAvailable", "message": "The requested VM size for resource 'Following SKUs have failed for Capacity Restrictions: Standard_DS1_v2' is currently not available in location 'eastus2'. Please try another size or deploy to a different location or different zone. See https://aka.ms/azureskunotavailable for details."}

suggestions provided by ai learn assistant, like changing the target VM does not work.

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
417 questions
{count} votes

Accepted answer
  1. Manas Mohanty 3,020 Reputation points Microsoft External Staff
    2025-04-08T16:22:26.8033333+00:00

    Hi Karol Adamiak

    The above error suggests that Default deployment SKU Standard_DS1_v2' is currently not available in location 'eastus2'.

    Please follow the below steps to find available SKU and use them

    1. Please use below command to find available SKU in "eastus2" region.
         az vm list-sizes --location eastus2
      
    2. Add one more parameter with "--parameters vmSize='Standard_D4_v3' #any other SKU supported and mentioned here.
    az deployment group create --resource-group IoTEdgeResources --template-uri "https://aka.ms/iotedge-vm-deploy" --parameters dnsLabelPrefix='<REPLACE_WITH_VM_NAME>' --parameters adminUsername='azureuser' --parameters deviceConnectionString=$(az iot hub device-identity connection-string show --device-id myEdgeDevice --hub-name
    <REPLACE_WITH_HUB_NAME> -o tsv) --parameters authenticationType='password' --parameters adminPasswordOrKey="<REPLACE_WITH_PASSWORD>" --parameters vmSize='Standard_D4_v3'
    
    
    

    Hope it helps fix the issue.

    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    Thank You.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.