I want to be able to programmattically add virtual machines to the inventory of vCenter. I.e. I don't want to have to add them interactively via the vSphere gui. The following KB article says that you can do so from the command-line of an esx host, but that you shouldn't if you manage the host via vCenter, because if you do, then you "may cause a mismatch between the host and the vCenter Server inventory and may cause unexpected results"
I do use vCenter, so I assume then that I shouldn't use the command-line method shown in that KB.
Is there some other command-line or API way to add guests to the inventory that wouldn't cause a problem with vCenter? Can I do this via the vSphere VCLI, for example?
Thanks,
Jon