Microsoft Virtualization Discussions

Using Set-SMHVDataset to bulk add VM's

Adam_D
3,214 Views

Hi,

 

I'm trying to use the Set-SMHVDataset Cmd-Let to add over 600 Hyper-V VM's into the relevant dataset.

 

I have a script but the Cmd-Let just seems to hang and doesn't set anything.  If I create a Dataset from scratch using the Add-SMHVDataset Cmd-Let it will create it but still will not add any hosts or VM's into it.

 

I enter the command as below:

Set-SMHVDataset -DataSetName DS1 -VM's @{"Host"="Cluster1"; "Names"="VM1"}

 

Is there anyone who has got this to work in their environment?

 

Thanks

2 REPLIES 2

Dan
NetApp Alumni
3,192 Views

Just wondering if it has to do with the scope of the cluster. I just tested in my environment following with success:

 

Set-SMHVDataSet -DataSetName "mydataset" -VMs @{"Host"="localhost"; "Names"="*"}

 

Can you give it a try with the local node name or IP?

 

Best regards,
Dan

 

 

Adam_D
3,178 Views

Thanks for the reply.

 

I've run it with both the Cluster Name and the host name with both giving the same issue.  I use the clustername as if you do a Get-SMHVDataset it is the cluster name that shows, not the node name. 

 

The same error occurs using the IP address of the cluster so it's not a name resolution issue.  I've also run with a wildcard for the VM's with no success incase it was related to the VM names

 

I've have just tried running our VMM server too, rather than our Orchastrator server where we are hoping to do all our automated management of the environment incase it was a server thing but the same issue.

Public