Red Hat Bugzilla – Bug 1234990
SCVMM provisioning from template fails to extrapolate the destination storage correctly
Last modified: 2015-12-08 08:18:34 EST
Description of problem: SCVMM provisioning from template fails to extrapolate the destination storage correctly. Version-Release number of selected component (if applicable): CFME 5.4 SCVMM SP1/R2 How reproducible: Provision from template will fail with this PowerShell error: New-SCVirtualMachine : Cannot create or update a highly available virtual machine because Virtual Machine Manager could not locate or access C: Followed by '[JSON::ParserError]: 757: unexpected token' error in evm.log Steps to Reproduce: 1. 2. 3. Actual results: Provision fails. Expected results: Provision successful. Additional info: Following def in clone.rb fails to extrapolate the destination storage: def dest_mount_point dest_datastore.name.scan(DRIVE_LETTER).last.to_s end Example would be 'C:\ClusterStorage\CLUSP04 Prod Volume 3-1' but method produces 'C'. "file://server.local/C:/ClusterStorage/CLUSP04%20Prod%20Volume%203-1".scan(/[a-z][:]/i).last.to_s
GregB - Can you have someone from on the SCVMM group take a look into this issue.
Here's a suggested fix: def dest_mount_point d_ds = dest_datastore.name.to_s.scan(/file:\/\/.*\/([A-Z][:].*)/i) d_ds = d_ds[0][0].to_s d_ds.gsub(/\/|%20/, '/' => '\\', '%20' => ' ') end
https://github.com/ManageIQ/manageiq/pull/3651
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/76fa43376a313fa3a7dc0b5ebb477368bd2596ea commit 76fa43376a313fa3a7dc0b5ebb477368bd2596ea Author: Bronagh Sorota <bsorota@redhat.com> AuthorDate: Wed Jul 29 15:37:58 2015 -0400 Commit: Bronagh Sorota <bsorota@redhat.com> CommitDate: Wed Jul 29 15:37:58 2015 -0400 Correctly handles manipulation of the datastore name. Handles: - URI decoding (note, we encode the datastore path in the SCVMM parser; as I understand it, this is a requirement for SSA ) - more complex datastore paths - converting forward slashes to backslashes suitable for running the command on a Windows Server https://bugzilla.redhat.com/show_bug.cgi?id=1234990 app/models/miq_provision_microsoft/cloning.rb | 5 +++-- spec/models/miq_provision_microsoft_spec.rb | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-)
https://github.com/ManageIQ/manageiq/pull/3663
Detected commit referencing this ticket while ticket status is POST.
High Availability virtual machines can only be provisioned on Cluster Share Volumes. I created the CSV, as well as an High Availability configured template. Using an HA VM, and storing in on the Cluster Shared Volume the provision works just fine. FYI, whenever you see this ([JSON::ParserError]) just open up the Jobs tab of SCVMM and find the failed Create Virtual Machine job. Click on that job and you'll get an explanation of exactly what went wrong. Moving this to Verified as SCVMM provision appears to be working correctly with 5.5.0.3 using https://10.8.58.233/miq_request/show/105r4
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