我一直在关注Microsoft Quick Start模板来创建一个带有Windows VM的VM ScaleSet,如下所述:https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/tutorial-create-and-manage-powershell。
我能够找出Scale Set的Load Balancer的Public IP,以及用于RDP / 3389的入站端口,从而运行mstsc /v:a.b.c.d:nnnn
。
我得到了Initiating remote connection
弹出窗口。但是,而不是应该遵循的身份挑战对话框,而是获得(正常,但不希望在这里)错误弹出Remote Desktop can't connect to the remote computer for one of these reasons:
。就好像VM已关闭,网络阻塞我,或者VM上的RDP已关闭。
我可以假设VM的RDP已打开,并且Azure端网络路由(在PS粘贴中创建)是否正确?其他人是否面临同样的困难?如果是这样,我们如何RDP进入这些虚拟机?
来自示例文档的Powershell(我使用不同的名称,但它是相同的命令):
$cred=Get-Credential
New-AzureRmVmss `
-ResourceGroupName "myResourceGroup3" `
-Location "EastUS" `
-VMScaleSetName "myScaleSet3" `
-VirtualNetworkName "myVnet3" `
-SubnetName "mySubnet3" `
-PublicIpAddressName "myPublicIPAddress3" `
-LoadBalancerName "myLoadBalancer3" `
-UpgradePolicyMode "Automatic" `
-VmSize "Standard_F1" `
-Credential $cred
请注意,我使用的是AzureRm cmdlet的6.13.0
版本。
PowerShell命令应该在您成功创建VMSS时起作用。这个脚本也适合我。我建议您验证以下有关RDP连接的信息:
mstsc /v:a.b.c.d:nnnn
时检查是否键入了正确的映射端口。您可以通过每个实例的入站NAT规则找到的特定端口。您将看到特定端口5000和目标端口3389作为我的图片。有关更多详细信息,请参阅troubleshoot Remote Desktop connections to an Azure virtual machine和Detailed troubleshooting steps for remote desktop connection issues to Windows VMs in Azure。