VMware Cloud Community
RobMokkink
Expert
Expert

Clone_VM task + runonce working again

Today i finally had time to do some more tests of my bulk deploy/redeploy script. Before Update 1, the vCenter service crashed because of the runonce in the Clone_VM task.

Reference of the Clone_VM task:

http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.VirtualMachine.html#c...

But i did some tests today, and everything was fine.

Anyone else did some more tests?

The reason i don't use the New-VM cmdlet, is that i don't like creating all the OS Customization Specifications.

0 Kudos
2 Replies
jeveenj
Enthusiast
Enthusiast

Hi,

Can you please elaborate what you mean by some more tests?

However, you could try using the New-VM cmdlet.

In New-VM cmdlet we don’t necessarily have to specify the OSCustomizationSpec since it’s an optional parameter.

By simple one-liner, you can clone vm

New-VM -Name MyVM -VM <vm> -Datastore <ds> -VMHost <host> 

In addition, for creating “n” no. of VM you can use loops.

In case if I had misunderstood your question, then please let me now.

-If you found this information useful, please consider awarding points for Correct or Helpful.
0 Kudos
RobMokkink
Expert
Expert

What i mean with more tests is that i tested my clone vm script and now the runonce inside the clone_vm task now works again.

In the first releases of vSphere it would crash the vCenter server service.

If i use the new-vm cmdlet and i want to deploy a vm from template i need to customize it, and i don't want to be dependend on the customization specifications.

0 Kudos