OVF is a VMware virtual appliance format which allows you to deploy VMs with custom settings and state. This solution replaces stand alone installation packages and becomes increasingly popular. I had to create support for automatically deploying one of such OVFs. Actually, I managed to get my hands on OVA and converted it into OVF, but I am not sure if this fact has too much relevance to the story.
However, when I tried to deploy this OVF using both VIM API and vSphere client by connecting directly to the ESX server (instead of vCenter), I got errors Access to resource settings on the host is restricted to the server that is managing it: x.y.z.n” and The operation is not allowed in the current state. The error clearly indicated that the OVF file which is basically XML file containing VM-to-be configurations, tries to alter resource settings which it is not allowed running as the managed ESX. Since connecting to vCenter was not an option in my case, I had to tweak the OVF file until by trial and error I found the problematic setting (see the bottom element):
<Item>
<rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
<rasd:Description>Memory Size</rasd:Description>
<rasd:ElementName>3072MB of memory</rasd:ElementName>
<rasd:InstanceID>2</rasd:InstanceID>
<rasd:ResourceType>4</rasd:ResourceType>
<rasd:VirtualQuantity>3072</rasd:VirtualQuantity>
<rasd:Weight>30720</rasd:Weight>
</Item>
Obviously, I gave up on resource weight, but at least I was able to deploy OVF directly from the ESX server.