VMware Solutions Discussions


VSC 6.2 Cmdlets - Not Creating VM in Correct Folder or Applying OS Custom Spec

For some reason when using the following the VM's get created but it does not put them in the correct folder and it does not apply the correct customization spec.  Any ideas why this would not be working.  Also is there a way to have the VM created using the "Cluster" instead of specifying a host.  Otherwise I need to create them all on a single host (there are 70) and then balance them through code afterwards using PowerCLI.


I did not provide all the values for the different variables but they are all being defined and I have validated that.


$CustSpec = "EnviroWeb"
$DestFolder = "QA Environment"

$NewCloneTaskID = new-vscClone `
-virtualMachineName $vmTemplateName ` -ParentStorageSystemID $vmTemplateStorageID ` -DestStorageSystemID $dsStorageID ` -DataStoreName $dsName ` -custSpecification $CustSpec ` -specifiedDestinationVmFolder $DestFolder ` -DestinationHostName $InitialESXHost ` -DiskFormat THIN ` -MemorySize 8192 ` -VirtualProcessors 4 ` -NewCloneNamesArray $thisBatchVMList ` -AdvancedCloning


Check out the KB!
Knowledge Base
All Community Forums