VMware Cloud Community
shankarg
Contributor
Contributor

how to deploy vdi on clusters

Hi All,

We have cmdlets for deploying vdi's using the new-vm -template. and also we can provide the answers from the csv file using the for loop.

But in the cmdlet we can pass the parameters like vmhost or host but how to do this if i have clustered env.

I have tried like this

new-vm -name " VM NAME" -template (get-template "windows xp") -host "ESX Host FQDN Name"

this works fine but if use -datastore it is giving the error message . Did any one tried this .......

Thanks

Shankar.g

Reply
0 Kudos
2 Replies
halr9000
Commander
Commander

It may be a matter of "-datastore (get-datastore $datastoreName)". It's possible that some cmdlets or parameters don't accept strings where they could and instead require a certain type of object as input. It's my understanding that these will be ironed out by release.

Hal Rottenberg

Co-Host, PowerScripting Podcast (http://powerscripting.net)

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
Reply
0 Kudos
admin
Immortal
Immortal

It may be a matter of "-datastore (get-datastore $datastoreName)". It's possible that some cmdlets or parameters don't accept strings where they could and instead require a certain type of object as input. It's my understanding that these will be ironed out by release.

Hal Rottenberg

Co-Host, PowerScripting Podcast (http://powerscripting.net)

For now you should try, e.g. -datastore (get-datastore mydatastore).

To clarify Hal's comment, we realize that this is a pain and you should be able to just say -datastore mydatastore, and we hope to fix this for GA, but we're not certain that this will happen for 1.0 GA.

Reply
0 Kudos