Is there a way to specify only a DRS cluster and have it place a VM isntead of having to specify a host?
Yes, by using the ResourcePool parameter on the New-VM cmdlet.
Just tried it using the name fo the DRS cluster and it failed, do I have to specify something different for it to work?
Here is error:
New-VM : 2/23/2012 2:15:56 PM New-VM Value cannot be found for the ma
ndatory parameter VMHost
At line:1 char:7
It looks like it is looking for VMhost, but i am trying to ahve it auto select based on the cluster
Just to make sure you have the command correct, it should look like this:
new-vm -name nameofvm -resourcepool (get-cluster nameofDRSenabledcluster)
zsoldier,
I have verified that everythign is good, but it appears to required the -vmhost parameter based on the error. I am wondering if that is supported only in a newer version of powercli??
see error below:
[vSphere PowerCLI] U:\powercli\deployvm> New-VM -name test -ResourcePool (get-cl
uster MS_DELL_ESXi_TEST_DEV | Get-ResourcePool)
New-VM : 2/24/2012 8:12:36 AM New-VM Value cannot be found for the ma
ndatory parameter VMHost
At line:1 char:7
+ New-VM <<<< -name test -ResourcePool (get-cluster MS_DELL_ESXi_TEST_DEV | Ge
t-ResourcePool)
+ CategoryInfo : NotSpecified: (:) [New-VM], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomatio
n.ViCore.Cmdlets.Commands.NewVM
Which version are your running ?
Get-PowerCLIVersion
Go for the latest 5.0.1
Let me upgrade, i thought 4.1 U1 vcenter wasn't supported, but it looks like it is.
Powercli 4.1 U1
Edit:
The upgrade to powercli 5.0 did the trick, thanks Luc!
Is your FQDN correct? Seeing FullyQualifiedErrorId errors