A HostSystem managed object contains an array of virtual machines that are hosted by the corresponding physical machine. As shown in Example: Sample Script (Commented Version), you can access the name property of entity_view by calling its name method, as follows:To retrieve the value of a property defined as an enumeration, you must dereference its value from within the containing object by qualifying the property with ->val. For example, the power state of a virtual machine (powerState) is a member of the runtime data object.To retrieve the value of powerState, you must dereference the two containing objects (the view object and the runtime data object) and the value itself (val), as follows:Because powerState is an enumeration, you use runtime->powerState->val to retrieve its string value.$data_object is a blessed reference to a Perl object or class name, and property is a method call on the object.For example, creating a virtual machine requires the creation of a data structure that includes a number of nested data objects. One of those objects is a VirtualMachineFieldInfo data object, which can be constructed as follows:This code is taken from the apps/vm/vmcreate.pl utility application. See the scripts in the apps and samples directories for examples of simple and complex uses of data objects.