1

我在虚拟机部署中设置以下 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 防火墙阻止了访问,是否可以在部署时打开防火墙?

4

2 回答 2

0
            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!!
于 2014-04-10T00:45:08.017 回答
0

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

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

于 2014-04-10T04:09:17.860 回答