The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Azure Virtual Machines!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

 none
Cannot RDP to freshly provisioned WinServer 2019 VM RRS feed

  • Question

  • I have created and deleted 3 virtual machines.

    Just a simple basic server 2019 instance. This is the template:

    {
        "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
        "contentVersion": "1.0.0.0",
        "parameters": {
            "location": {
                "type": "string"
            },
            "networkInterfaceName": {
                "type": "string"
            },
            "networkSecurityGroupName": {
                "type": "string"
            },
            "networkSecurityGroupRules": {
                "type": "array"
            },
            "subnetName": {
                "type": "string"
            },
            "virtualNetworkName": {
                "type": "string"
            },
            "addressPrefixes": {
                "type": "array"
            },
            "subnets": {
                "type": "array"
            },
            "publicIpAddressName": {
                "type": "string"
            },
            "publicIpAddressType": {
                "type": "string"
            },
            "publicIpAddressSku": {
                "type": "string"
            },
            "virtualMachineName": {
                "type": "string"
            },
            "virtualMachineRG": {
                "type": "string"
            },
            "osDiskType": {
                "type": "string"
            },
            "virtualMachineSize": {
                "type": "string"
            },
            "adminUsername": {
                "type": "string"
            },
            "adminPassword": {
                "type": "secureString"
            },
            "diagnosticsStorageAccountName": {
                "type": "string"
            },
            "diagnosticsStorageAccountId": {
                "type": "string"
            },
            "diagnosticsStorageAccountType": {
                "type": "string"
            },
            "diagnosticsStorageAccountKind": {
                "type": "string"
            }
        },
        "variables": {
            "nsgId": "[resourceId(resourceGroup().name, 'Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroupName'))]",
            "vnetId": "[resourceId(resourceGroup().name,'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]",
            "subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]"
        },
        "resources": [
            {
                "name": "[parameters('networkInterfaceName')]",
                "type": "Microsoft.Network/networkInterfaces",
                "apiVersion": "2019-07-01",
                "location": "[parameters('location')]",
                "dependsOn": [
                    "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSecurityGroupName'))]",
                    "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]",
                    "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]"
                ],
                "properties": {
                    "ipConfigurations": [
                        {
                            "name": "ipconfig1",
                            "properties": {
                                "subnet": {
                                    "id": "[variables('subnetRef')]"
                                },
                                "privateIPAllocationMethod": "Dynamic",
                                "publicIpAddress": {
                                    "id": "[resourceId(resourceGroup().name, 'Microsoft.Network/publicIpAddresses', parameters('publicIpAddressName'))]"
                                }
                            }
                        }
                    ],
                    "networkSecurityGroup": {
                        "id": "[variables('nsgId')]"
                    }
                }
            },
            {
                "name": "[parameters('networkSecurityGroupName')]",
                "type": "Microsoft.Network/networkSecurityGroups",
                "apiVersion": "2019-02-01",
                "location": "[parameters('location')]",
                "properties": {
                    "securityRules": "[parameters('networkSecurityGroupRules')]"
                }
            },
            {
                "name": "[parameters('virtualNetworkName')]",
                "type": "Microsoft.Network/virtualNetworks",
                "apiVersion": "2019-04-01",
                "location": "[parameters('location')]",
                "properties": {
                    "addressSpace": {
                        "addressPrefixes": "[parameters('addressPrefixes')]"
                    },
                    "subnets": "[parameters('subnets')]"
                }
            },
            {
                "name": "[parameters('publicIpAddressName')]",
                "type": "Microsoft.Network/publicIpAddresses",
                "apiVersion": "2019-02-01",
                "location": "[parameters('location')]",
                "properties": {
                    "publicIpAllocationMethod": "[parameters('publicIpAddressType')]"
                },
                "sku": {
                    "name": "[parameters('publicIpAddressSku')]"
                }
            },
            {
                "name": "[parameters('virtualMachineName')]",
                "type": "Microsoft.Compute/virtualMachines",
                "apiVersion": "2019-07-01",
                "location": "[parameters('location')]",
                "dependsOn": [
                    "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]",
                    "[concat('Microsoft.Storage/storageAccounts/', parameters('diagnosticsStorageAccountName'))]"
                ],
                "properties": {
                    "hardwareProfile": {
                        "vmSize": "[parameters('virtualMachineSize')]"
                    },
                    "storageProfile": {
                        "osDisk": {
                            "createOption": "fromImage",
                            "managedDisk": {
                                "storageAccountType": "[parameters('osDiskType')]"
                            }
                        },
                        "imageReference": {
                            "publisher": "MicrosoftWindowsServer",
                            "offer": "WindowsServer",
                            "sku": "2019-Datacenter",
                            "version": "latest"
                        }
                    },
                    "networkProfile": {
                        "networkInterfaces": [
                            {
                                "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaceName'))]"
                            }
                        ]
                    },
                    "osProfile": {
                        "computerName": "[parameters('virtualMachineName')]",
                        "adminUsername": "[parameters('adminUsername')]",
                        "adminPassword": "[parameters('adminPassword')]",
                        "windowsConfiguration": {
                            "enableAutomaticUpdates": true,
                            "provisionVmAgent": true
                        }
                    },
                    "licenseType": "Windows_Server",
                    "diagnosticsProfile": {
                        "bootDiagnostics": {
                            "enabled": true,
                            "storageUri": "[concat('https://', parameters('diagnosticsStorageAccountName'), '.blob.core.windows.net/')]"
                        }
                    }
                }
            },
            {
                "name": "[parameters('diagnosticsStorageAccountName')]",
                "type": "Microsoft.Storage/storageAccounts",
                "apiVersion": "2019-06-01",
                "location": "[parameters('location')]",
                "properties": {},
                "kind": "[parameters('diagnosticsStorageAccountKind')]",
                "sku": {
                    "name": "[parameters('diagnosticsStorageAccountType')]"
                }
            }
        ],
        "outputs": {
            "adminUsername": {
                "type": "string",
                "value": "[parameters('adminUsername')]"
            }
        }
    }

    The firewall is open for TCP/3389. 

    I have created a few of these without any issues. 

    I can't understand what the problem could be. Must be a problem with Azure?

    Anyone can confirm?

    Wednesday, November 13, 2019 2:28 PM

All replies