Cloud Cruiser became HPE Consumption Analytics on Nov. 1st. You'll still see the old name in places while we update this site.

 

 

Consumption Analytics Documentation

Home > Cloud Cruiser 3 > Setting Up Collection > Native collectors > VMware vSphere > Snapshot collector > Defining snapshot profiles

Defining snapshot profiles

You must define a snapshot profile for each type of managed object for which you want to collect snapshot data. This profile specifies the properties to collect for entities of that type. This section explains how to reference different kinds of properties in a snapshot profile.

The name , type , and id properties are collected automatically for every managed object type for which you define a snapshot profile, so you do not need to explicitly reference them.

Direct properties

A direct property exists on the entity for which you are defining a profile. You reference a direct property by its name.

For example, to collect the datastore property for entities of type VirtualMachine , you would define the following profile:

<bean class="com.cloudcruiser.batch.collect.vmware.vsphere.snapshot.SnapshotProfile">
  <property name="type" value="VirtualMachine" />
  <property name="properties">
    <list>
      <value>datastore</value>
    </list>
  </property>
</bean>

This profile generates the following XML, to which you would apply an XMLOutputMapping in the feed configuration:

<VirtualMachine>
  <datastore>datastore‐148</datastore>
  <name>MyVM</name>
  <type>VirtualMachine</type>
  <id>vm‐222</id>
</VirtualMachine>

Properties of child data object types

Some properties that you need to collect exist on data objects that are children one or more levels down from the object type for which you are defining a profile, where the child object is considered a property of its parent. You can reference such properties, as well as the name property of a child managed object type, with a recursive < object >.< property > notation.

For example, the properties indicating the virtual CPU count or memory size of a VM are properties of the data object config , which is a child of and property of the data object summary , which is a child of and property of the managed object type VirtualMachine . The property indicating extra configuration options of the VM is an array that is a child and property of a different data object named config , which is a child of and property of VirtualMachine . To collect these three properties, you would define the following snapshot profile for VirtualMachine :

<bean class="com.cloudcruiser.batch.collect.vmware.vsphere.snapshot.SnapshotProfile">
  <property name="type" value="VirtualMachine" />
  <property name="properties">
    <list>
      <value>summary.config.numCpu</value>
      <value>summary.config.memorySizeMB</value>
      <value>config.extraConfig</value>
    </list>
  </property>
</bean>

Each dot-delimited part of a property name is a child property of the part to its left, and the leftmost part is a property of VirtualMachine . This profile generates the following XML:

<VirtualMachine>
  <config>
    <extraConfig>
      <OptionValue>
        <key>virtualHW.productCompatibility</key>
        <value type="xs:string">hosted</value>
      </OptionValue>
      <OptionValue>
        <key>mem.hotadd</key>
        <value type="xs:string">true</value>
      </OptionValue>
      ...
    </extraConfig>
  </config>
  <summary>
    <config>
      <memorySizeMB>2048</memorySizeMB>
      <numCpu>1</numCpu>
    </config>
  </summary>
  <name>MyVM</name>
  <type>VirtualMachine</type>
  <id>vm‐222</id>
</VirtualMachine>

Properties of child managed object types

Some properties that you need to collect exist on managed objects that are children one or more levels down from the object type for which you are defining a profile, where the child object is considered a property of its parent. To collect any such properties other than id you must traverse to the target managed object type using the optional traverseProfiles property, which is a list of other SnapshotProfile objects nested within the main profile.

For example, to collect the product name, OS type, and version of the host system for each VirtualMachine , you would define the following snapshot profile:

<bean class="com.cloudcruiser.batch.collect.vmware.vsphere.snapshot.SnapshotProfile">
  <property name="type" value="VirtualMachine" />
  <property name="traverseProfiles">
    <list>
      <bean class="com.cloudcruiser.batch.collect.vmware.vsphere.snapshot.SnapshotProfile">
        <property name="type" value="HostSystem" />
        <property name="path" value="runtime.host" />
        <property name="properties">
          <list>
            <value>config.product.fullName</value>
            <value>config.product.osType</value>
            <value>config.product.version</value>
          </list>
        </property>
      </bean>
    </list>
  </property>
</bean>

You cannot simply reference these properties as dot-delimited child properties of VirtualMachine such as runtime.host.config.product.fullName because host is a managed object type. Instead, you must define a nested profile to resolve the runtime.host reference to a HostSystem object and then reference the child properties of that object. This profile generates the following XML:

<VirtualMachine>
  <HostSystem>
    <config>
      <product>
        <fullName>VMware ESXi 5.1.0 build‐799733</fullName>
        <osType>vmnix‐x86</osType>
        <version>5.1.0</version>
      </product>
    </config>
  </HostSystem>
  <name>MyVM</name>
  <type>VirtualMachine</type>
  <id>vm‐222</id>
</VirtualMachine>

Nested profiles are evaluated after retrieving the properties for the parent profile. You can nest profiles to multiple levels as needed.

For more information about object types and available properties, see the VMware vSphere API Reference.

Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP