Quantcast
Channel: VMware Communities : Popular Discussions - vCloud Director PowerCLI
Viewing all articles
Browse latest Browse all 13334

New-vm in vCloud Director with PowerCli 5.5

$
0
0

Hi,

 

I have been working with Powercli on scripting the creation of multiple VM's inside a vApp and cant seem to get anywhere with the new-vm command.

As each vApp will have a different number of VM's i want to programatically control the creation.

 

In vSphere i can run my Powercli script to create multiple VM's from a CSV file. 

After translating this into vCloud, I can get a vApp up and running, but cant seem to use new-vm to start populating the vApp.

 

My script goes something like this...

 

Connect-CIServer -Server servername -Org myorg -User username -Password password

$myOrgVdc = Get-OrgVdc -Name 'myvdc'

$myVAppTemplate = Get-CIVAppTemplate -Name 'myvapptemplate'

$myVApp = New-CIVApp -Name 'vApp1' -VAppTemplate $myVAppTemplate -OrgVdc $myOrgVDC

$vm = new-vm -template 'myvmtemplate' -name 'vm1' -resourcepool $myVApp'

 

I have tried multiple variations on the new-vm command with no luck so far.

 

I have also spent a few hours reading up on the documentation, forums, blogs, etc but haven't yet been able to find someone who has solved this problem.

 

Any help would be greatly appreciated.

 

Thanks


Viewing all articles
Browse latest Browse all 13334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>