Creating Inventory Objects
The Folder managed entity provides methods for creating instances of the following managed entities.
- Datacenter
- DistributedVirtualSwitch
- VirtualMachine
- Cluster
- Folder
When you create these objects, they appear in the folder you invoked the creation method from.
While some managed entities are created through a method on the Folder managed entity, other managed entities are instantiated directly. For example, the HostDatastoreSystem has methods for creating datastores such as CreateNasDatastore and CreateVmfsDatastore.
Important: When you create an inventory
object, you must stay within the bounds of the host’s capabilities, accessible
through the
HostSystem.capability property,
which is a
HostCapability data object. For
example, a
HostCapability object might have
the
maxSupportedVMs property
specified.