Description of problem: SCVMM provisioning from template fails for templates with spaces in their name. Version-Release number of selected component (if applicable): CFME 5.4 SCVMM SP1 and R2 How reproducible: Attempt to provision from an SCVMM template with a space in the name. Steps to Reproduce: 1. 2. 3. Actual results: PowerShell Get-SCVMTemplate fails owing to missing parameter, which in turn produces a [JSON::ParserError] error on evm.log and provision fails. Expected results: Provisioning successful. Additional info:
Greg - Please reassign
Fix is to add single quotes in the following procedures in cloning.rb as follows: def template_ps_script "(Get-SCVMTemplate -Name '#{source.name}')" end def build_ps_script <<-PS_SCRIPT Import-Module VirtualMachineManager; Get-SCVMMServer localhost;\ $vm = New-SCVirtualMachine \ -Name '#{dest_name}' \ -VMHost #{dest_host} \ -Path '#{dest_mount_point}' \ -VMTemplate #{template_ps_script}; \ Set-SCVirtualMachine -VM $vm \ #{cpu_ps_script} \ #{memory_ps_script} | Out-Null; \ #{network_adapter_ps_script} \ $vm | Select-Object ID | ConvertTo-Json PS_SCRIPT end
PR: https://github.com/ManageIQ/manageiq/pull/3631
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/747592b11c296e42e082e78b53aa76fa3d0ef671 commit 747592b11c296e42e082e78b53aa76fa3d0ef671 Author: Bronagh Sorota <bsorota> AuthorDate: Tue Jul 28 13:18:43 2015 -0400 Commit: Bronagh Sorota <bsorota> CommitDate: Tue Jul 28 13:18:43 2015 -0400 Handles provisioning from a template with spaces in name https://bugzilla.redhat.com/show_bug.cgi?id=1234894 app/models/miq_provision_microsoft/cloning.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commit detected on cfme/5.4.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=1abf868f184d3069149a7741a15d57f714eed5e4 commit 1abf868f184d3069149a7741a15d57f714eed5e4 Author: Bronagh Sorota <bsorota> AuthorDate: Tue Jul 28 13:18:43 2015 -0400 Commit: Bronagh Sorota <bsorota> CommitDate: Thu Jul 30 13:45:48 2015 -0400 Handles provisioning from a template with spaces in name https://bugzilla.redhat.com/show_bug.cgi?id=1234894 vmdb/app/models/miq_provision_microsoft/cloning.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commit detected on cfme/5.4.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=3ef8ddcbc7f08eb2769295a2770f88135b0c68cc commit 3ef8ddcbc7f08eb2769295a2770f88135b0c68cc Merge: 9402346 1abf868 Author: Greg Blomquist <gblomqui> AuthorDate: Fri Jul 31 11:19:06 2015 -0400 Commit: Greg Blomquist <gblomqui> CommitDate: Fri Jul 31 11:19:06 2015 -0400 Merge branch 'scvmm_provisioning_space_in_template_name-5.4.z' into '5.4.z' SCVMM : Handles provisioning from a template with spaces in name Clean Cherry pick. https://bugzilla.redhat.com/show_bug.cgi?id=1234894 See merge request !208 vmdb/app/models/miq_provision_microsoft/cloning.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Verified in 5.5.0.7
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