Hi,
The resourcepool parameter does not take inputs such as Business Critical, see my simple code below and error.
New-VM -Name ibgkbapp01 -Template rhel5u5-64-v7 -Datastore vmfs_duprb1_ns960_0650_20 -ResourcePool Business Critical
The Error :
And using -ResourcePool "Business Critical" doesn't make a difference.. ?
Im no wiz at it, but it was the first thing that came into mind...
/Rubeck
Please change -resourcepool parameter like "Business Critical" and give it a try...
Tried that, but no user, it still complains of the same error
I got something like this and it worked great.
Move-VM -VM (Get-VM -Name ibgkbapp01) -Destination (Get-Cluster duprb1| Get-ResourcePool -Name "Business Critical")
The error message you got is clear, it says "expects a single value".
It looks as if you have at least 2 resource pools with the name "Business Critical" in your vSphere environment.
By passing a specific cluster to the Get-ResourcePool cmdlet, you are in fact providing the Location parameter through the pipeline.
That way the cmdlet could return 1 specific resource pool.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You probably have more than one cluster with a resourcepool called "Business Critical". The command in your first post returned all these resourcepools and didn't know where to put the new VM. The command in your last post selects the "Business Critical" resourcepool in the right cluster.
(Get-Cluster duprb1| Get-ResourcePool -Name "Business Critical")
returns only one resourcepool and your command is happy.
Regards, Robert
Right, i got it wrong initially,
thanks all for the replies.
Eight years later and the information is still a lifesaver. Thank You Kindly!