Bug 1512865

Summary: unable to provision against SCVMM with "VMM is unable to perform this operation without a connection to a Virtual Machine Manager management server"
Product: Red Hat CloudForms Management Engine Reporter: Felix Dewaleyne <fdewaley>
Component: ProvidersAssignee: Adam Grare <agrare>
Status: CLOSED CURRENTRELEASE QA Contact: Dave Johnson <dajohnso>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 5.8.0CC: agrare, cpelland, dajohnso, fdewaley, gblomqui, jfrey, jhardy, ncatling, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly
Target Release: 5.10.0Flags: lkhomenk: automate_bug+
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1513628 1513699 (view as bug list) Environment:
Last Closed: 2018-06-21 20:56:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1513628, 1513699    

Description Felix Dewaleyne 2017-11-14 10:46:51 UTC
Description of problem:
unable to provision against SCVMM with "VMM is unable to perform this operation without a connection to a Virtual Machine Manager management server"

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

How reproducible:
customer environment

Steps to Reproduce:
1.provision against the scvmm environment
2.
3.

Actual results:
The provision fails at the checkprovisioned stage on a JSON parsing error due to how SCVMM replied

Expected results:
the provision passes or the error is properly caught, even if not sent using the JSON format

Additional info:
the customer suspects the issue is in /var/www/miq/vmdb/app/models/manageiq/providers/microsoft/infra_manager/provision

in the method cloning.rb the VMMServer attribute is missing:
--- cloning.rb  2017-11-13 16:47:25.285270237 +0100
+++ cloning.rb.rhorig   2017-11-13 16:29:54.672742487 +0100
@@ -118,7 +118,7 @@
   def build_ps_script
     <<-PS_SCRIPT
     Import-Module VirtualMachineManager | Out-Null; \
-      $template = Get-SCVMTemplate -Name '#{source.name}' -VMMServer localhost; \
+      $template = Get-SCVMTemplate -Name '#{source.name}'; \
       $vmconfig = New-SCVMConfiguration -VMTemplate $template -Name 'ManageIQConfig-#{dest_name}'; \
       $vmhost   = Get-SCVMHost -ComputerName '#{dest_host}'; \

there is also online information suggesting that such an issue could be tied to the provider (and a trace of a community resolution that solved it by changing the owner of the SQL database)

Comment 4 Felix Dewaleyne 2017-11-14 17:14:35 UTC
in the cloning.rb file (/var/www/miq/vmdb/app/models/manageiq/providers/microsoft/infra_manager/provision)

in the method cloning.rb the VMMServer attribute is missing:
--- cloning.rb  2017-11-13 16:47:25.285270237 +0100
+++ cloning.rb.rhorig   2017-11-13 16:29:54.672742487 +0100
@@ -118,7 +118,7 @@
   def build_ps_script
     <<-PS_SCRIPT
     Import-Module VirtualMachineManager | Out-Null; \
-      $template = Get-SCVMTemplate -Name '#{source.name}' -VMMServer localhost; \
+      $template = Get-SCVMTemplate -Name '#{source.name}'; \
       $vmconfig = New-SCVMConfiguration -VMTemplate $template -Name 'ManageIQConfig-#{dest_name}'; \
       $vmhost   = Get-SCVMHost -ComputerName '#{dest_host}'; \

the customer of the case 01970317 fixed their issue with this