PMem storage policy is not associated with disk when virtual machine is deployed using OVF
search cancel

PMem storage policy is not associated with disk when virtual machine is deployed using OVF

book

Article ID: 336060

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • OVF is generated from a virtual machine that contains PMem disks.
  • OVF is exported using vSphere Client or Content Library APIs, but OVF is deployed using a different mechanism or API, such as OVF Tool or OvfManager API.
  • After deploying the OVF, PMem disks are downgraded to regular disks.


Environment

VMware vCenter Server 6.7.x

Cause

vSphere Client uses Content Library APIs to deploy and export OVF templates.
Content Library supports PMem storage policies through the use of storage groups in the OVF descriptor.
OVF Manager does not support storage groups and instead uses storage type in the OVF descriptor to identify PMem disks. It is a known limitation that the APIs are not interchangeable.

Resolution

Use the same APIs to export and import the OVF package. To identify which API generated the OVF descriptor, open the OVF file as a text file.

a. If the OVF descriptor has a StorageGroupSection element in the Envelope and a StorageGroup element in the Item element for the disk, then the OVF was generated from Content Library API.

For example:

    <vmw:StorageGroupSection ovf:required="false" vmw:id="group1" vmw:name="Host-local PMem Default Storage Policy">
        <Info>Storage policy for group of disks</Info>

        <vmw:Description>The Host-local PMem Default Storage Policy storage policy group</vmw:Description>
    </vmw:StorageGroupSection>


and

    <Item>
        <rasd:AddressOnParent>1</rasd:AddressOnParent>
        <rasd:ElementName>Hard Disk 1</rasd:ElementName>
        <rasd:HostResource>ovf:/disk/vmdisk1</rasd:HostResource>
        <rasd:InstanceID>8</rasd:InstanceID>
        <rasd:Parent>4</rasd:Parent>
        <rasd:ResourceType>17</rasd:ResourceType>
        <vmw:StorageGroup ovf:required="false">group1</vmw:StorageGroup>
    </Item>


You can deploy this OVF using the vSphere Client or Content Library API. In the vSphere Client, the Deploy OVF Template action is available on the datacenter, cluster, or host.

b. If the OVF descriptor has a StorageType element in the Item element for the disk, then the OVF was generated from OvfManager API.

For example:

      <Item>
          <rasd:AddressOnParent>1</rasd:AddressOnParent>
          <rasd:ElementName>Hard Disk 1</rasd:ElementName>
          <rasd:HostResource>ovf:/disk/vmdisk1</rasd:HostResource>
          <rasd:InstanceID>8</rasd:InstanceID>
          <rasd:Parent>4</rasd:Parent>
          <rasd:ResourceType>17</rasd:ResourceType>
          <vmw:StorageType ovf:required="false">PMEM</vmw:StorageType>
      </Item>


You can deploy this OVF using OVF Tool or OvfManager and ResourcePool.importVApp APIs.

You can also modify the OVF descriptor to the format that the API expects, but there may be other incompatibilities.