Execute wsman

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Execute wsman

Hussain Dahodwala
Hello,

I have successfully installed wsman and other packages using rpm.

Now I have enabled WINRM on a Windows 2008 R2 Datacentre edition.

After running the following command from my Linux machine to the target Windows machine I get the following error.

=========================================
[root@centos ~]# wsman identify -h XX.XX.XX.XX --port 5355 -u Administrator --password my_passwd
Connection failed. response code = 0
couldn't connect to server
=========================================

Are there any links to refer to solve this problem, as Google does-not show anything specific.

--
With Regards,
Hussain.


------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: Execute wsman

Klaus Kaempf
* Hussain Dahodwala <[hidden email]> [Aug 02. 2013 09:49]:
> Hello,
>
> I have successfully installed wsman and other packages using rpm.
>
> Now I have enabled WINRM on a Windows 2008 R2 Datacentre edition.
>

Have you followed the setup instructions available here:
https://github.com/Openwsman/openwsman/wiki/winrm-over-openwsman-setup

> After running the following command from my Linux machine to the target
> Windows machine I get the following error.
>
> =========================================
> [root@centos ~]# wsman identify -h XX.XX.XX.XX --port 5355 -u Administrator
> --password my_passwd

The port number is non-standard. It should be 5985 (http) or 5986
(https).

Try to test the tcp connection to winrm first. You can use 'telnet
<host> <port>' for this, e.g. "telnet 192.168.1.2 5985"

Hth,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: Execute wsman

Hussain Dahodwala
Hello Klaus,

Many thanks for sharing the details, it worked like a charm.

Now when I fire this command:
======================================
wsman identify -h XX.XX.XX.XX --port 5985 -u Administrator --password my_passwd
Authentication failed, please retry
======================================

Error I am getting in EventViewer of Windows machine is this
"Sending HTTP 401 response to the client and disconnect the connection after sending the response."

I have added all the given rules in the setup instructions document.

I am able to telnet the server at port 5985 from my linux machine.

Kindly note that the Windows machine is added in a failover cluster using AD.

Any clues ?

--
With Regards,
Hussain.


------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: Execute wsman

Klaus Kaempf
* Hussain Dahodwala <[hidden email]> [Aug 02. 2013 11:27]:

> Hello Klaus,
>
> Many thanks for sharing the details, it worked like a charm.
>
> Now when I fire this command:
> ======================================
> wsman identify -h XX.XX.XX.XX --port 5985 -u Administrator --password
> my_passwd
> Authentication failed, please retry
> ======================================

Be aware that http (port 5985) transmits the username and password in
clear-text ! Better use https (port 5986).

>
> Error I am getting in EventViewer of Windows machine is this
> "Sending HTTP 401 response to the client and disconnect the connection
> after sending the response."

Pass "-y basic" or "--auth basic". Windows does not support digest
auth and Openwsman (resp. Openssl) does not (yet) support the other
authentication mechanisms.

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: Execute wsman

Hussain Dahodwala
Hello Klaus,

Many thanks for your reply.

I added the "--auth basic" option and received the desired results. :)

I am now using C Code to call MSVM class of WMI to get some VM details and also create/start/stop VMs.

Will keep you posted.

Thank again.

--
With Regards,
Hussain.


------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel