Create a Stand-Alone
Virtual Disk with an Attached Storage Encryption Policy
The following example shows how to format an
XML string to specify an I/O filter policy for a virtual disk.
- Verify that the name for the policy is user-friendly.
- Verify that the ID string to identify the policy is unique. The ID must be unique among the set of policies known to SPBM.
The format is specific to the current version of
the VMware Web Services API. This format might not be compatible with other API
versions.
- Build the policy<capability>element, which specifies the filter.<capability> <capabilityId> <id>vmwarevmcrypt@encryption</id> <namespace>IOFILTERS</namespace> <constraint></constraint> </capabilityId> </capability>
- Wrap the<capability>element singly in a<subProfiles>element, adding the rule name.<subProfiles> <capability> <capabilityId> <id>vmwarevmcrypt@encryption</id> <namespace>IOFILTERS</namespace> <constraint></constraint> </capabilityId> </capability> <name>Rule-Set 1: IOFILTERS</name> </subProfiles>
- Wrap the<subProfiles>element singly in a<constraints>element.<constraints> <subProfiles> <capability> <capabilityId> <id>vmwarevmcrypt@encryption</id> <namespace>IOFILTERS</namespace> <constraint></constraint> </capabilityId> </capability> <name>Rule-Set 1: IOFILTERS</name> </subProfiles> </constraints>
- Append profile metadata, such as name and creation date.<constraints> <subProfiles> <capability> <capabilityId> <id>vmwarevmcrypt@encryption</id> <namespace>IOFILTERS</namespace> <constraint></constraint> </capabilityId> </capability> <name>Rule-Set 1: IOFILTERS</name> </subProfiles> </constraints> <createdBy>client</createdBy> <creationTime>1999-12-31T23:59:59Z</creationTime> <lastUpdatedTime>1999-12-31T23:59:59Z</lastUpdatedTime> <generationId>1</generationId> <name>IOfilter-Encrypt</name>
- Wrap the<constraints>element and metadata in a<storageProfile>element, and prefix an XML header.<?xml version='1.0' encoding='UTF-8'?> <storageProfile xsi:type='StorageProfile'> <constraints> <subProfiles> <capability> <capabilityId> <id>vmwarevmcrypt@encryption</id> <namespace>IOFILTERS</namespace> <constraint></constraint> </capabilityId> </capability> <name>Rule-Set 1: IOFILTERS</name> </subProfiles> </constraints> <createdBy>client</createdBy> <creationTime>1999-12-31T23:59:59Z</creationTime> <lastUpdatedTime>1999-12-31T23:59:59Z</lastUpdatedTime> <generationId>1</generationId> <name>IOfilter-Encrypt</name> <profileId>I am Unique</profileId> </storageProfile>
You can create a
ProfileSpec
to contain the XML
data. See the
vSphere Web Services SDK Programming
Guide
.