Description of problem: Error while provision to CSVFS is not recognized by CFME "[EVM] VM [test-provt-w2fi] Step [CheckProvisioned] Status [[JSON::ParserError]: 743: unexpected token at ] Message [[JSON::ParserError]: 743: unexpected token at '']" Version-Release number of selected component (if applicable):5.7.2.1/5.8.0.9 How reproducible:100% Steps to Reproduce: 1.provison VM to CSVFS Storage 2.Check error message Actual results:[EVM] VM [test-provt-w2fi] Step [CheckProvisioned] Status [[JSON::ParserError]: 743: unexpected token at ] Message [[JSON::ParserError]: 743: unexpected token at ''] Expected results:that is how error looks on SCVMM side: Error (23001) Cannot create or update a non highly available virtual machine because the path C:\ClusterStorage\netapp_crud_vol\test-provt-w2fi is a clustered resource.
This is not a bug as far as what is happening. You MUST use an HA template to provision on an HA resource. The test as performed is expected to fail. Dan and I are currently looking into the possibility of presenting a better error message.
I think I see what's happening, in part thanks to Jeff's help. The issue is that the build_ps_script in cloning.rb is actually running two commands - New-SCVirtualMachine and Set-SCVirtualMachine - and assumes that the first one always succeeds. What's really happening is that the first command is failing. When I tried to run a deliberately bad provisioning script I get "Cannot create or update a non highly available virtual machine because the path C:\\whatever\\your_vm is a clustered resource." But you never see that, and it sets $vm to a blank string. Ultimately that blank string is what gets passed back to our code. If you try JSON.parse("") in an irb shell, for example, you will see the same error that the reporter pasted. So, I need to refactor the cloning.rb file, breaking up the powershell script into two parts, and doing some better error checking for each one.
Please see https://github.com/ManageIQ/manageiq/pull/14842
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-2018:0380