Creating VMware ESXi virtuals using the Perl SDK

I’ve been tinkering with the Perl SDK for VMware this last week.

I wanted to create a virtual from the command line using the shipped ‘vmcreate.pl’ script – but the ‘datacenter’ variable it insists be there doesn’t appear anywhere in the ESXi console. This had me a bit flummoxed – until the Perl debugger came to my rescue.

Looking at the data structure I noticed the default datacenter is called ‘ha-datacenter’. Stick this in your XML file to create the host, et voila! ESXi automation sorted.

 

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>