Bug 1233815 - Extract running process doesn't work without error message
Summary: Extract running process doesn't work without error message
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: GA
: 5.5.0
Assignee: Nick Carboni
QA Contact: Jeff Teehan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-19 13:55 UTC by Christian Jung
Modified: 2015-12-08 13:14 UTC (History)
10 users (show)

Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-08 13:14:36 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1236599 0 high CLOSED For SCVMM hypervisor, verifying host credentials throws EPIPE 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2015:2551 0 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 17:58:09 UTC

Internal Links: 1236599

Description Christian Jung 2015-06-19 13:55:26 UTC
Description of problem:
With the release of CFME 5.4 the bug #1191279 was closed. But apparently it's still not possible to extract the list of running processes from a Windows VM.


Version-Release number of selected component (if applicable):
5.4.0.5.20150605150206_7daa1a8 

How reproducible:
always

Steps to Reproduce:
1. setup a Windows VM
2. (I'm not sure this is necessary, but I joined the VM to a Windows AD)
3. set the login credentials to use in Configure, Configuration, Zones
4. Make sure WMI access is enabled (Windows Firewall!)
5. navigate to the VM and click on Configuration, Extract running processes

Actual results:
no process information available

Expected results:
Processes should be listed

Additional info:
I did test this on RHEV 3.4 with Windows 7 SP1 and Windows 8.1 (both english language version).

Here is the error message if I run wmic directly on the Appliance:
$ wmic -U 'ad\administrator%<password>' //<ip address> query 
[wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0x80041017 - NT code 0x80041017

If I mistype the password an access denied error is shown, proving this is not a credential error.

The evm.log did not show any errors or warning related to this. Also the task UI (Configure, Tasks in CFME) shows the action was performed successfully.

Comment 2 Dave Johnson 2015-06-26 12:43:04 UTC
Greg, not sure if who should get this but I am figuring you know so assigning to you. Thx

Comment 3 Greg McCullough 2015-06-26 18:20:38 UTC
Christian - Can you supply the query you were testing with?

The error reported in the description 0x80041017 is WBEM_E_INVALID_QUERY "Query was not syntactically valid."

Also when issuing the wmic command try specifying the namespace: --namespace="root\cimv2"

The query should be in quotes as well.  Testing this will obviously not fix the issue but will help validate that you can successfully connect and return data from the terminal.

Comment 4 Christian Jung 2015-06-29 08:10:19 UTC
I googled and found this example, which seems to work fine:
# wmic -U 'ad\<user>%<password>' //<ipaddress> "Select * from Win32_Bios"
CLASS: Win32_BIOS
BiosCharacteristics|BIOSVersion|BuildNumber|Caption|CodeSet|CurrentLanguage|Description|IdentificationCode|InstallableLanguages|InstallDate|LanguageEdition|ListOfLanguages|Manufacturer|Name|OtherTargetOS|PrimaryBIOS|ReleaseDate|SerialNumber|SMBIOSBIOSVersion|SMBIOSMajorVersion|SMBIOSMinorVersion|SMBIOSPresent|SoftwareElementID|SoftwareElementState|Status|TargetOperatingSystem|Version
(3,42,48,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79)|(BOCHS  - 1)|(null)|Default System BIOS|(null)|(null)|Default System BIOS|(null)|0|(null)|(null)|NULL|Seabios|Default System BIOS|(null)|True|20070101000000.000000+000|9F393900-350D-11E1-9CF2-C03FD560822E|0.5.1|2|4|True|Default System BIOS|3|OK|0|BOCHS  - 1

This was executed on the appliance from which I want to extract the running processes.

Comment 5 Nick Carboni 2015-07-20 21:06:29 UTC
https://github.com/ManageIQ/manageiq/pull/3540

Comment 6 CFME Bot 2015-07-21 02:16:46 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/4ca5443b2a048df4e67efbc54d8816a3ee2861a3

commit 4ca5443b2a048df4e67efbc54d8816a3ee2861a3
Author:     Nick Carboni <ncarboni>
AuthorDate: Mon Jul 20 11:37:20 2015 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Mon Jul 20 11:37:20 2015 -0400

    Use AwesomeSpawn to fork the wmic process with the password as an argument.
    
    The wmic process did not seem to be listening on stdin for the
    password, so we now pass the credentials as command line arguments
    through AwesomeSpawn.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1233815

 gems/pending/util/win32/miq-wmi-linux.rb | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

Comment 9 CFME Bot 2015-08-27 16:21:29 UTC
Detected commit referencing this ticket while ticket status is POST.

Comment 10 CFME Bot 2015-08-27 16:21:37 UTC
Detected commit referencing this ticket while ticket status is POST.

Comment 11 Nick Carboni 2015-08-27 17:39:29 UTC
Added upstream kickstart package line after building the el7 rpm.

Comment 12 CFME Bot 2015-08-28 17:58:12 UTC
New commit detected on ManageIQ/manageiq-appliance-build/master:
https://github.com/ManageIQ/manageiq-appliance-build/commit/6fff7bb97b9349f3f645e4d4b8cc2760fa06e477

commit 6fff7bb97b9349f3f645e4d4b8cc2760fa06e477
Author:     Nick Carboni <ncarboni>
AuthorDate: Mon Jul 20 16:57:47 2015 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Thu Aug 27 10:51:32 2015 -0400

    Install wmi on appliance build.
    
    The wmic tool is needed to get running processes from windows machines.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1233815

 kickstarts/base.ks.erb | 2 ++
 1 file changed, 2 insertions(+)

Comment 13 CFME Bot 2015-08-28 17:58:16 UTC
New commit detected on ManageIQ/manageiq-appliance-build/master:
https://github.com/ManageIQ/manageiq-appliance-build/commit/52bf1333deb360fd402d790adec1b5d8152d1f95

commit 52bf1333deb360fd402d790adec1b5d8152d1f95
Author:     Nick Carboni <ncarboni>
AuthorDate: Thu Aug 27 10:54:09 2015 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Thu Aug 27 10:54:09 2015 -0400

    Add wmi to packages section of kickstart
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1233815

 kickstarts/base.ks.erb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comment 14 Jeff Teehan 2015-11-06 17:53:08 UTC
The is verified IF:

The Windows VM firewall is either disabled or the appropriate ports are open.

The account used is "Administrator".

All of these settings have been checked:
https://social.technet.microsoft.com/Forums/windowsserver/en-US/4f33837b-1cb1-4648-85b1-3ba87cbfe93e/wmi-remote-access-denied?forum=winserverManagement

You will get the following output:

[root@10-16-6-43 ~]# wmic -U 'Administrator' //10.16.7.124 "Select * from Win32_Bios"
Password for [WORKGROUP\Administrator]:
CLASS: Win32_BIOS
BiosCharacteristics|BIOSVersion|BuildNumber|Caption|CodeSet|CurrentLanguage|Description|IdentificationCode|InstallableLanguages|InstallDate|LanguageEdition|ListOfLanguages|Manufacturer|Name|OtherTargetOS|PrimaryBIOS|ReleaseDate|SerialNumber|SMBIOSBIOSVersion|SMBIOSMajorVersion|SMBIOSMinorVersion|SMBIOSPresent|SoftwareElementID|SoftwareElementState|Status|TargetOperatingSystem|Version
(4,7,9,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29,30,34,36,37,40)|(VRTUAL - 5001223,BIOS Date: 05/23/12 17:15:53  Ver: 09.00.06,BIOS Date: 05/23/12 17:15:53  Ver: 09.00.06)|(null)|BIOS Date: 05/23/12 17:15:53  Ver: 09.00.06|(null)|enUS|BIOS Date: 05/23/12 17:15:53  Ver: 09.00.06|(null)|1|(null)|(null)|(enUS)|American Megatrends Inc.|BIOS Date: 05/23/12 17:15:53  Ver: 09.00.06|(null)|True|20120523000000.000000+000|3121-6152-0103-6474-5905-8349-90|090006 |2|3|True|BIOS Date: 05/23/12 17:15:53  Ver: 09.00.06|3|OK|0|VRTUAL - 5001223

Comment 16 errata-xmlrpc 2015-12-08 13:14:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2551


Note You need to log in before you can comment on or make changes to this bug.