我在虚拟机部署中设置了以下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防火墙阻止了访问,是否可以在部署时打开防火墙?
答案 0 :(得分: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!!
答案 1 :(得分:0)
当天结束时的问题是一个简单的拼写错误。元素应该是WinRM而不是WinRm。事实上,没有架构或运行时验证错误确实隐藏了原因。
修正拼写错误后,使用自签名证书设置公共端口上的winrm / https。 虽然Winrm / http仅为内部网络设置。