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.