SCVMM Provider Cloning.rb changes


I would like to append to the dest_mount_point variable in /var/www/miq/vmdb/app/models/manageiq/providers/microsoft/infra_manager/provision/cloning.rb

We have subfolders within our data stores where newly provisioned machines should go, rather than in the root.

I have tried the following

def dest_mount_point
name =
URI.decode(name.to_s).tr(’/’, ‘\’) << '\VMs’

This changes the path to forward slashes already in variable name and correctly appends \VMs, so SCVMM complains that it cannot find the path

And in build_ps_script

$vm = New-SCVirtualMachine
-Name ‘#{dest_name}’
-ComputerName ‘#{dest_name}’
-VMHost #{dest_host}
-Path ‘#{dest_mount_point}’ << ‘\VMs’ \

This method returns an error in the script formulation, complaining that &lt $lt is reserved.

What’s the correct way to achieve this append to the data store location?


I think the new fileshare code will just allow you to share a directory on Hyper-V and select that for placement. Looking at it now.