Bug 1200137 - SCVMM VM power function failing with error
Summary: SCVMM VM power function failing with error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.3.0
Hardware: All
OS: All
medium
low
Target Milestone: GA
: 5.5.0
Assignee: Bronagh Sorota
QA Contact: Milan Falešník
URL:
Whiteboard:
Depends On:
Blocks: 1245685
TreeView+ depends on / blocked
 
Reported: 2015-03-09 20:04 UTC by ncatling
Modified: 2015-12-08 13:03 UTC (History)
8 users (show)

Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1245685 (view as bug list)
Environment:
Last Closed: 2015-12-08 13:03:24 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
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

Description ncatling 2015-03-09 20:04:41 UTC
Description of problem:

VM power operations failing on SCVMM 2012 SP1 provider using PowerShell 4.

Error produced: ‘Get-SCVirtualMachine : The term 'Get-SCVirtualMachine' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.’

Fixed by amending following line in vmdb/app/models/ems_microsoft.rb

command = "powershell Import-Module VirtualMachineManager; Get-VMMServer #{ipaddress}; #{cmdlet}-SCVirtualMachine -VM (Get-SCVirtualMachine -ID #{vm_uid_ems}) #{params}"

Version-Release number of selected component (if applicable):
CFME 5.3
SCVMM 2012 SP1
PowerShell 4.0

How reproducible:
Attempt power on/off of SCVMM hosted VM.


Steps to Reproduce:
1. Select VM in Infrastructure\VMs
2. Select Power > Power Off
3.

Actual results:
VM remains on. Following error in scvmm.log

[----] I, [2015-03-09T17:52:08.114997 #14574:b0e80c]  INFO -- : MIQ(EmsRefresh::Parsers::Scvmm.ems_inv_to_hashes) Collecting data for EMS name: [SCVMM (10.3.56.116)] id: [1000000000003]...Complete
[----] E, [2015-03-09T17:56:03.115857 #25301:ad9814] ERROR -- : MIQ(Class#log_dos_error_results) Get-SCVirtualMachine : The term 'Get-SCVirtualMachine' is not recognized as 
the name of a cmdlet, function, script file, or operable program. Check the 
spelling of the name, or if a path was included, verify that the path is 
correct and try again.
At line:1 char:28
+ Stop-SCVirtualMachine -VM (Get-SCVirtualMachine -ID 
dbd4aa4c-53eb-40ff-a4c6-5c1c ...
+                            ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-SCVirtualMachine:String) [] 
   , CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


Expected results:
VM powered off/on.


Additional info:

Comment 6 Greg Blomquist 2015-07-28 19:57:54 UTC
https://github.com/ManageIQ/manageiq/pull/2094

Upstream PR for handling SP1.

Comment 8 Bronagh Sorota 2015-09-30 16:04:03 UTC
Hi Milan,
I think it best to test in R2 since that is the version we officially support.

thanks
Bronagh

Comment 9 ncatling 2015-09-30 16:12:27 UTC
This problem only relates to SP1, so needs to be tested in an SP1 environment.

Comment 10 Bronagh Sorota 2015-09-30 16:14:26 UTC
I missed that part. Yes, only testing in an SP1 env is suffice.

Comment 12 errata-xmlrpc 2015-12-08 13:03:24 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.