【问题标题】:Winrm is not avaliable on Windows Azure Windows VMWinrm 在 Windows Azure Windows VM 上不可用
【发布时间】:2014-02-23 12:48:02
【问题描述】:

我正在虚拟机部署中设置以下 ConfigurationSet

            <ConfigurationSet xsi:type="WindowsProvisioningConfigurationSet">
                <ConfigurationSetType>WindowsProvisioningConfiguration</ConfigurationSetType>
                <ComputerName>ROLE173D</ComputerName>
                <AdminUsername>myname</AdminUsername>
                <AdminPassword>mypassword</AdminPassword>
                <WinRm>
                    <Listeners>
                        <Listener>
                            <Protocol>Http</Protocol>
                        </Listener>
                        <Listener>
                            <Protocol>Https</Protocol>
                        </Listener>
                    </Listeners>
                </WinRm>
                <DisableSshPasswordAuthentication>false</DisableSshPasswordAuthentication>
            </ConfigurationSet>

虽然创建了 Window VM(并设置了端点),但它似乎没有启动 winrm 服务。

编辑

似乎 winrm 确实在端口 5985 上运行,并且 Endpoint 设置为允许 5985,但 Windows VM 防火墙阻止了访问,是否可以在部署时打开防火墙?

【问题讨论】:

  • 您是否在 VM 上配置了端点以允许外部访问?
  • 是的,我做了,我检查并打开了,问题是Windows Server内部防火墙默认关闭。

标签: powershell azure powershell-remoting winrm


【解决方案1】:
            Seems the request what you have formed has to have a thumbprint
        if you intend to access winrm via https and the way how you pass
        the request seems to be little different. Can you pass your request like this?
        change the listener protocol to type

            <WinRm>
                  <Listeners>
                    <Listener>
                      <Type>Http</Type>
                    </Listener>
                    <Listener>
                      <Type>Https</Type>
                      <CertificateThumbprint>yourcertthumbprint</CertificateThumbprint>
                    </Listener>
                  </Listeners>
            </WinRm>

    This winrm request should add firewall exception rule. 


    Alternatively you can run the following powershell command for adding firewall policy for winrm service and you are all set.

    Enable-PSRemoting

Let me know if this helps!!

【讨论】:

  • 最终我发现了问题,这是一个愚蠢的错字。元素 WinRm 与 WinRM。
【解决方案2】:

最终的问题是一个简单的错字修复。该元素应该是 WinRM 而不是 WinRm。没有架构或运行时验证错误这一事实确实隐藏了原因。

修复错字后,使用自签名证书设置公共端口上的 winrm/https。 而 Winrm/http 仅针对内部网络设置。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-10
    • 2020-03-30
    • 2019-04-26
    • 2021-06-14
    • 1970-01-01
    相关资源
    最近更新 更多