OVF import of SR-IOV vm's fails with The value of the dvx.deviceClass field cannot be null
search cancel

OVF import of SR-IOV vm's fails with The value of the dvx.deviceClass field cannot be null

book

Article ID: 443320

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

When attempting to import an Open Virtualization Format (OVF) template exported from a virtual machine configured with an SR-IOV network adapter into the Content Library Service, the import fails.

The following exception is observed in the Content Library service logs located at (/var/log/vmware/content-library/cls.log):

java.lang.IllegalArgumentException: The value of the dvx.deviceClass field cannot be null.
at com.vmware.ovf.hardware.convert.HardwareSectionParser.getDVXBackingInfo(HardwareSectionParser.java:2633)
at com.vmware.ovf.hardware.convert.HardwareSectionParser.handleNetwork(HardwareSectionParser.java:1885)
at com.vmware.ovf.hardware.convert.HardwareSectionParser.run(HardwareSectionParser.java:2214)
at com.vmware.ovf.hardware.convert.HardwareSectionParser.parseHardwareSection(HardwareSectionParser.java:2314)
at com.vmware.ovf.hardware.convert.HardwareConverter.parseHardwareSection(HardwareConverter.java:21)

Environment

VMware vCenter Server 8.0.3
VMware vSphere ESXi 8.0.3

Cause

The OVF import parser in the Content Library Service throws an IllegalArgumentException when the dvx.deviceClass VMware configuration field is absent from an SR-IOV network adapter item in the OVF descriptor.

While the OVF exporter correctly omits this field for standard SR-IOV adapters, the import validation incorrectly requires it, resulting in an asymmetry between export and import operations that causes the task to fail.

Resolution

Broadcom Engineering is aware of this issue and is planning to resolve it in a future release. Subscribe to this article to be notified when the fix is available.

To work around this issue, modify the OVF descriptor file to temporarily change the network adapter type prior to importing:

  1. Open the exported .ovf descriptor file in a text editor.

  2. Locate the <Item> block corresponding to the SR-IOV network adapter.

  3. Change the resource subtype from SR-IOV to VMXNET3 by replacing:
    <rasd:ResourceSubType>SriovEthernetCard</rasd:ResourceSubType>
    with
    <rasd:ResourceSubType>Vmxnet3</rasd:ResourceSubType>

  4. Save the .ovf file.

  5. Re-calculate the SHA hash for the modified .ovf file and update the .mf manifest file, or delete the .mf file entirely to bypass checksum validation.

  6. Import the modified OVF template.

  7. After deployment, edit the virtual machine settings to configure the network adapters back to SR-IOV.