VMware Cloud Community
Gratts01
Contributor
Contributor

Auto-Deploy Rule to Assign Host to Cluster

Trying to implement auto deploy into our vsphere 5.5 environment but running into one issue when creating deploy rules.

Image Profile = PROD-Image

Cluster Name = DC01

Profile =      Auto

New-Deployrule -Name "ProdRule" -Item "PROD-Image", "Auto", "DC01" -Pattern "vendor=cisco", "ipv4=xxx.xxx.xxx.xxx-xxx.xxx.xxx.xxx"

Add-DeployRule -DeployRule ProdRule

The above command will install the image and apply the host profile but will NOT place the host into the "DC01" cluster.

Can anyone point the error in this command.

Thanks,

0 Kudos
1 Reply
aparrna51193
Enthusiast
Enthusiast

hello,

I am afraid you can't use the names directly. As you check the new-deployrule cmdlet , -item is the "VIObjectCore[]".  so the cluster must be assigned to an object and the object must be passed in the command.


Eg: $c= Get-Cluster -Name DC01

now use $c in command instead of cluster name.

0 Kudos