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:
https://github.com/ManageIQ/manageiq/pull/2094 Upstream PR for handling SP1.
Hi Milan, I think it best to test in R2 since that is the version we officially support. thanks Bronagh
This problem only relates to SP1, so needs to be tested in an SP1 environment.
I missed that part. Yes, only testing in an SP1 env is suffice.
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