Issue in WinRM on Linux

Hi All, I am trying to create and launch a *windows10 guest VM* using libvirt-vagrant over Linux/KVM. The Windows box I am using is "*peru/windows-10-enterprise-x64-eval*". The Windows guest is created and allocated IP in 192.168.xxx.xxx range. Did WinRM configurations on Windows Guest OS. On Linux messages "*DEBUG winrmshell: [WinRM] opening remote shell on http://IP:5985/wsman <http://IP:5985/wsman>*" were seen around 20 times ( default winrm tries 20) and after that VM was disconnected with message Error: An error of type WinRM::WinRMHTTPTransportError happened, message is Unable to parse authorization header. Headers: {"Mime-Version"=>"1.0", "Date"=>"Wed, 06 Apr 2022 13:40:44 GMT", "Content-Type"=>"text/html;charset=utf-8", "Content-Length"=>"277", "X-iboss-Error"=>"ERR_CONNECT_FAIL 110", "X-Cache"=>"MISS from bgproxy06-int.prxy.ice.xxx.com", "Connection"=>"keep-alive"} Body: <!doctype html> <html> <head> <meta http-equiv="refresh" content="0;url= http://7rx80271.ibosscloud.com/ibreports/ibp/bp.html?bu=http://10.xxx.xxx.xxx:5985/wsman&bc=Failed%20to%20retrieve%20requested%20URL.&ip=10.xxx.xxx.xx&er=ERR_CONNECT_FAIL "/> </head> <body> </body> </html> (503). Error: Exiting with code 1 I tried accessing WinRM service on Windows guest using http://localhost:5985/wsman but got an error *HTTP 405 page is not working currently* but when I tried http://localhost:5985/WS-Man result was *HTTP Error 404. The requested resource is not found.* *Question is:* *1. Do libvirt support winrm to connect with Windows guest?* *2. The request to open a remote shell should be http://IP:5985/WS-Man <http://IP:5985/WS-Man> rather than http://IP:5985/wsman <http://IP:5985/wsman>?* *Waiting for a swift reply.* *Regards* *Nishit*

Hi, Any updates or pointer on *DEBUG winrmshell: [WinRM] opening remote shell on http <http://ip:5985/wsman> issue?* *Regards* *Nishit* On Wed, Apr 6, 2022 at 7:32 PM Nishit Sharma <sharmafrequent@gmail.com> wrote:
Hi All,
I am trying to create and launch a *windows10 guest VM* using libvirt-vagrant over Linux/KVM. The Windows box I am using is "*peru/windows-10-enterprise-x64-eval*". The Windows guest is created and allocated IP in 192.168.xxx.xxx range. Did WinRM configurations on Windows Guest OS. On Linux messages "*DEBUG winrmshell: [WinRM] opening remote shell on http://IP:5985/wsman <http://IP:5985/wsman>*" were seen around 20 times ( default winrm tries 20) and after that VM was disconnected with message
Error: An error of type WinRM::WinRMHTTPTransportError happened, message is Unable to parse authorization header. Headers: {"Mime-Version"=>"1.0", "Date"=>"Wed, 06 Apr 2022 13:40:44 GMT", "Content-Type"=>"text/html;charset=utf-8", "Content-Length"=>"277", "X-iboss-Error"=>"ERR_CONNECT_FAIL 110", "X-Cache"=>"MISS from bgproxy06-int.prxy.ice.xxx.com", "Connection"=>"keep-alive"} Body: <!doctype html> <html> <head> <meta http-equiv="refresh" content="0;url= http://7rx80271.ibosscloud.com/ibreports/ibp/bp.html?bu=http://10.xxx.xxx.xxx:5985/wsman&bc=Failed%20to%20retrieve%20requested%20URL.&ip=10.xxx.xxx.xx&er=ERR_CONNECT_FAIL "/> </head> <body> </body> </html> (503).
Error: Exiting with code 1
I tried accessing WinRM service on Windows guest using http://localhost:5985/wsman but got an error *HTTP 405 page is not working currently* but when I tried http://localhost:5985/WS-Man result was *HTTP Error 404. The requested resource is not found.*
*Question is:* *1. Do libvirt support winrm to connect with Windows guest?* *2. The request to open a remote shell should be http://IP:5985/WS-Man <http://IP:5985/WS-Man> rather than http://IP:5985/wsman <http://IP:5985/wsman>?*
*Waiting for a swift reply.*
*Regards* *Nishit*

On 4/6/22 16:02, Nishit Sharma wrote:
Hi All,
I'm not exactly sure what you are expecting from libvirt here. Libvirt does not configure anything inside the guest, for libvirt guest is basically a black box (except for a very small set of operations that guest agent can do, but Windows Remote Desktop is none of that). If you are having troubles connecting from outside I suspect a firewall issue somewhere. If you are using a libvirt network (e.g. the default one) in NAT mode, you want to configure port forward. But I guess you've done so since there is some communication going back and forth. Michal

Hi Michal, Thing is the winRM from linux is unable to open remote shell in windows guest as mentioned in error logs. I am using NAT mode but didn’t use port forwarding. Firewall for 5985 is open in windows guest and from linux I can connect with windows guest through Enter-PSSession and telnet. Even on guest os localhost:5985/wsman is showing http error 405, no page. Any suggestions? Regards Nishit On Mon, 11 Apr 2022 at 3:17 PM, Michal Prívozník <mprivozn@redhat.com> wrote:
On 4/6/22 16:02, Nishit Sharma wrote:
Hi All,
I'm not exactly sure what you are expecting from libvirt here. Libvirt does not configure anything inside the guest, for libvirt guest is basically a black box (except for a very small set of operations that guest agent can do, but Windows Remote Desktop is none of that).
If you are having troubles connecting from outside I suspect a firewall issue somewhere. If you are using a libvirt network (e.g. the default one) in NAT mode, you want to configure port forward. But I guess you've done so since there is some communication going back and forth.
Michal

On 4/11/22 12:49, Nishit Sharma wrote:
Hi Michal,
Thing is the winRM from linux is unable to open remote shell in windows guest as mentioned in error logs. I am using NAT mode but didn’t use port forwarding. Firewall for 5985 is open in windows guest and from linux I can connect with windows guest through Enter-PSSession and telnet. Even on guest os localhost:5985/wsman is showing http error 405, no page. Any suggestions?
Where is the winRM running? is it on the host that's running the Windows VM? Because if it is, then you shouldn't need any port forwarding as the host has access to the bridge and VM's NIC directly. Otherwise, you'll need port forwarding. Are you connecting from another VM? Then try checking firewall in the host. At any rate, I'm still failing to see what can libvirt do to help. Michal

Hi Michal, Reason for asking is I am using peru/windowsbox as guest os running on linux/kvm host. The box owner pointed winRM support in libvirt. The VM is running on linux/kvm host which have different domain IP (10.190.xxx.xxx) and windows guest gets 192.168.xxx.xxx IP. Atleast on windows localhost:985/wsman should be accessible. I am clueless. Regards Nishit On Mon, 11 Apr 2022 at 5:20 PM, Michal Prívozník <mprivozn@redhat.com> wrote:
On 4/11/22 12:49, Nishit Sharma wrote:
Hi Michal,
Thing is the winRM from linux is unable to open remote shell in windows guest as mentioned in error logs. I am using NAT mode but didn’t use port forwarding. Firewall for 5985 is open in windows guest and from linux I can connect with windows guest through Enter-PSSession and telnet. Even on guest os localhost:5985/wsman is showing http error 405, no page. Any suggestions?
Where is the winRM running? is it on the host that's running the Windows VM? Because if it is, then you shouldn't need any port forwarding as the host has access to the bridge and VM's NIC directly. Otherwise, you'll need port forwarding.
Are you connecting from another VM? Then try checking firewall in the host. At any rate, I'm still failing to see what can libvirt do to help.
Michal

It would look like you are using https://app.vagrantup.com/peru/boxes/windows-10-enterprise-x64-eval or a related image. Your best point of contact for support would likely be the Vagrant people. On 2022-04-11 08:17, Nishit Sharma wrote:
Hi Michal,
Reason for asking is I am using peru/windowsbox as guest os running on linux/kvm host. The box owner pointed winRM support in libvirt. The VM is running on linux/kvm host which have different domain IP (10.190.xxx.xxx) and windows guest gets 192.168.xxx.xxx IP. Atleast on windows localhost:985/wsman should be accessible. I am clueless.
Regards Nishit
On Mon, 11 Apr 2022 at 5:20 PM, Michal Prívozník <mprivozn@redhat.com> wrote:
On 4/11/22 12:49, Nishit Sharma wrote: > Hi Michal, > > Thing is the winRM from linux is unable to open remote shell in windows > guest as mentioned in error logs. I am using NAT mode but didn’t use > port forwarding. Firewall for 5985 is open in windows guest and from > linux I can connect with windows guest through Enter-PSSession and > telnet. Even on guest os localhost:5985/wsman is showing http error 405, > no page. > Any suggestions?
Where is the winRM running? is it on the host that's running the Windows VM? Because if it is, then you shouldn't need any port forwarding as the host has access to the bridge and VM's NIC directly. Otherwise, you'll need port forwarding.
Are you connecting from another VM? Then try checking firewall in the host. At any rate, I'm still failing to see what can libvirt do to help.
Michal
-- Alvin Starr || land: (647)478-6285 Netvel Inc. || Cell: (416)806-0133 alvin@netvel.net ||

Yes Alvin. I am using same box. Any contact for Vagrant folks? Regards Nishit On Mon, 11 Apr 2022 at 6:27 PM, Alvin Starr <alvin@netvel.net> wrote:
It would look like you are using https://app.vagrantup.com/peru/boxes/windows-10-enterprise-x64-eval or a related image.
Your best point of contact for support would likely be the Vagrant people.
On 2022-04-11 08:17, Nishit Sharma wrote:
Hi Michal,
Reason for asking is I am using peru/windowsbox as guest os running on linux/kvm host. The box owner pointed winRM support in libvirt. The VM is running on linux/kvm host which have different domain IP (10.190.xxx.xxx) and windows guest gets 192.168.xxx.xxx IP. Atleast on windows localhost:985/wsman should be accessible. I am clueless.
Regards Nishit
On Mon, 11 Apr 2022 at 5:20 PM, Michal Prívozník <mprivozn@redhat.com> wrote:
On 4/11/22 12:49, Nishit Sharma wrote:
Hi Michal,
Thing is the winRM from linux is unable to open remote shell in windows guest as mentioned in error logs. I am using NAT mode but didn’t use port forwarding. Firewall for 5985 is open in windows guest and from linux I can connect with windows guest through Enter-PSSession and telnet. Even on guest os localhost:5985/wsman is showing http error 405, no page. Any suggestions?
Where is the winRM running? is it on the host that's running the Windows VM? Because if it is, then you shouldn't need any port forwarding as the host has access to the bridge and VM's NIC directly. Otherwise, you'll need port forwarding.
Are you connecting from another VM? Then try checking firewall in the host. At any rate, I'm still failing to see what can libvirt do to help.
Michal
-- Alvin Starr || land: (647)478-6285 Netvel Inc. || Cell: (416)806-0133alvin@netvel.net ||
participants (3)
-
Alvin Starr
-
Michal Prívozník
-
Nishit Sharma