我发现这个页面“创建防火墙规则”,它假设显示设置一个虚拟机服务器级防火墙。
但是,在文档中,URL 模式包括“sqlserver”:https ://management.core.windows.net:8443/{subscriptionId}/services/sqlservers/servers/{serverName}/firewallrules
- 这是否意味着只能配置 SQLServers 防火墙?
- 是否有另一种使用 REST API 配置服务器级 VM 的方法?
- Azure中是否有类似于EC2 “实例元数据和用户数据”的东西,我可以使用它在VM引导程序上注入我的脚本,以便我可以从内部配置防火墙?
编辑
我检查了内置的防火墙是否打开,我可以使用“telnet XXX.XXX.XXX.XXX 5986”连接服务这是我运行时遇到的错误:
>Test-WSMan XXX.XXX.XXX.XXX
Test-WSMan : <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2150859046"
Machine="WIN-HAPHAM5EH3M"><f:Message>WinRM cannot complete the operation.
Verify that the specified computer name is valid, that the computer is accessible
over the network, and that a firewall exception for the WinRM service is enabled and
allows access from this computer. By default, the WinRM firewall exception for public
profiles limits access to remote computers within the same local subnet. </f:Message></f:WSManFault>
At line:1 char:1
+ Test-WSMan XXX.XXX.XXX.XXX
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (XXX.XXX.XXX.XXX:String) [Test-WSMan], InvalidOperationException
+ FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.TestWSManCommand