Bug 1512865 - unable to provision against SCVMM with "VMM is unable to perform this operation without a connection to a Virtual Machine Manager management server"
Summary: unable to provision against SCVMM with "VMM is unable to perform this operati...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.8.0
Hardware: All
OS: All
unspecified
urgent
Target Milestone: GA
: 5.10.0
Assignee: Adam Grare
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On:
Blocks: 1513628 1513699
TreeView+ depends on / blocked
 
Reported: 2017-11-14 10:46 UTC by Felix Dewaleyne
Modified: 2020-12-14 10:51 UTC (History)
10 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1513628 1513699 (view as bug list)
Environment:
Last Closed: 2018-06-21 20:56:30 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:
lkhomenk: automate_bug+


Attachments (Terms of Use)

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


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