We ran into an issue with the Nutanix OVA/OVF import, specifically for the CheckMK Appliance image but we tried the same with another other OVA image (Homeassistant) and had the same issue.

The messages we’d receive ranged from import Common.EntityValues.ova_null to “invalid path to vmdk”.

Proxmox used to have a similar issue, but this was fixed https://bugzilla.proxmox.com/show_bug.cgi?id=3818 and provided us a hint to what the error was.

The solution, in short, turned out to be a syntax “error” (or rather, Nutanix not being able to parse properly) in the OVF file inside the OVA archive. Below are the steps to fix it

Open/unpack the OVA file

This is just a regular TAR archive, you can open it with 7-zip on Windows or tar -xvf on Linux

Open the OVF file

Open the unpacked .ovf-file with a text editor. Below is the ovf file that comes with the CheckMK virtual appliance

<?xml version="1.0" encoding="UTF-8"?>
<Envelope ovf:version="1.0" xml:lang="en-US" xmlns="http://schemas.dmtf.org/ovf/envelope/1" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vbox="http://www.virtualbox.org/ovf/machine" xmlns:vmw="http://www.vmware.com/schema/ovf" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <References>
    <File ovf:href="virt1-1.7.6-disk1.vmdk" ovf:id="file1" ovf:size="709907456"/>
    <File ovf:href="virt1-1.7.6-disk2.vmdk" ovf:id="file2" ovf:size="81920"/>
  </References>
  <DiskSection>
    <Info>List of the virtual disks used in the package</Info>
    <Disk ovf:capacity="4" ovf:capacityAllocationUnits="byte * 2^30" ovf:diskId="vmdisk1" ovf:fileRef="file1" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized" ovf:populatedSize="2088632320" vbox:uuid="67bc42ba-f7a2-4da7-b0a1-d3a2675a0067"/>
    <Disk ovf:capacity="100" ovf:capacityAllocationUnits="byte * 2^30" ovf:diskId="vmdisk2" ovf:fileRef="file2" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized" ovf:populatedSize="0" vbox:uuid="bc4b1fb8-b7b7-416d-9228-1c640413d1bd"/>
  </DiskSection>
  <NetworkSection>
    <Info>Logical networks used in the package</Info>
    <Network ovf:name="Bridged">
      <Description>Logical network used by this appliance.</Description>
    </Network>
  </NetworkSection>
  <VirtualSystem ovf:id="Checkmk virt1">
    <Info>A virtual machine</Info>
    <ProductSection>
      <Info>Meta-information about the installed software</Info>
      <Product>Checkmk virt1</Product>
      <Vendor>Checkmk GmbH</Vendor>
      <Version>1.7.6</Version>
      <VendorUrl>https://checkmk.com/</VendorUrl>
    </ProductSection>
    <OperatingSystemSection ovf:id="102">
      <Info>The kind of installed guest operating system</Info>
      <Description>Other_64</Description>
      <vbox:OSType ovf:required="false">Linux_64</vbox:OSType>
    </OperatingSystemSection>
    <VirtualHardwareSection>
      <Info>Virtual hardware requirements for a virtual machine</Info>
      <System>
        <vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
        <vssd:InstanceID>0</vssd:InstanceID>
        <vssd:VirtualSystemIdentifier>Checkmk virt1</vssd:VirtualSystemIdentifier>
        <vssd:VirtualSystemType>virtualbox-2.2 vmx-10</vssd:VirtualSystemType>
      </System>
      <Item>
        <rasd:Caption>2 virtual CPU</rasd:Caption>
        <rasd:Description>Number of virtual CPUs</rasd:Description>
        <rasd:ElementName>2 virtual CPU</rasd:ElementName>
        <rasd:InstanceID>1</rasd:InstanceID>
        <rasd:ResourceType>3</rasd:ResourceType>
        <rasd:VirtualQuantity>2</rasd:VirtualQuantity>
      </Item>
      <Item>
        <rasd:AllocationUnits>MegaBytes</rasd:AllocationUnits>
        <rasd:Caption>4096 MB of memory</rasd:Caption>
        <rasd:Description>Memory Size</rasd:Description>
        <rasd:ElementName>4096 MB of memory</rasd:ElementName>
        <rasd:InstanceID>2</rasd:InstanceID>
        <rasd:ResourceType>4</rasd:ResourceType>
        <rasd:VirtualQuantity>4096</rasd:VirtualQuantity>
      </Item>
      <Item>
        <rasd:Address>0</rasd:Address>
        <rasd:Caption>scsiController0</rasd:Caption>
        <rasd:Description>SCSI Controller</rasd:Description>
        <rasd:ElementName>scsiController0</rasd:ElementName>
        <rasd:InstanceID>3</rasd:InstanceID>
        <rasd:ResourceType>6</rasd:ResourceType>
      </Item>

      <!-- Make changes here -->

      <Item>
        <rasd:AddressOnParent>0</rasd:AddressOnParent>
        <rasd:Caption>disk1</rasd:Caption>
        <rasd:Description>Disk Image</rasd:Description>
        <rasd:ElementName>disk1</rasd:ElementName>
        <rasd:HostResource>/disk/vmdisk1</rasd:HostResource>
        <rasd:InstanceID>4</rasd:InstanceID>
        <rasd:Parent>3</rasd:Parent>
        <rasd:ResourceType>17</rasd:ResourceType>
      </Item>
      <Item>
        <rasd:AddressOnParent>1</rasd:AddressOnParent>
        <rasd:Caption>disk2</rasd:Caption>
        <rasd:Description>Disk Image</rasd:Description>
        <rasd:ElementName>disk2</rasd:ElementName>
        <rasd:HostResource>/disk/vmdisk2</rasd:HostResource>
        <rasd:InstanceID>5</rasd:InstanceID>
        <rasd:Parent>3</rasd:Parent>
        <rasd:ResourceType>17</rasd:ResourceType>
      </Item>

      <!-- Make changes above -->

      <Item>
        <rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>
        <rasd:Caption>Ethernet adapter on &apos;Bridged&apos;</rasd:Caption>
        <rasd:Connection>Bridged</rasd:Connection>
        <rasd:ElementName>Ethernet adapter on &apos;Bridged&apos;</rasd:ElementName>
        <rasd:InstanceID>6</rasd:InstanceID>
        <rasd:ResourceSubType>E1000</rasd:ResourceSubType>
        <rasd:ResourceType>10</rasd:ResourceType>
      </Item>
      <vmw:Config ovf:required="false" vmw:key="firmware" vmw:value="efi"/>
    </VirtualHardwareSection>
    <vbox:Machine OSType="Linux_64" lastStateChange="2023-09-12T18:46:29Z" name="Checkmk virt1" ovf:required="false" snapshotFolder="Snapshots" uuid="{de7a3e5c-61fa-4854-aeda-9e6298e5d204}" version="1.16-linux">
      <ovf:Info>Complete VirtualBox machine configuration in VirtualBox format</ovf:Info>
      <ExtraData>
        <ExtraDataItem name="VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" value="Checkmk virt1"/>
        <ExtraDataItem name="VBoxInternal/Devices/efi/0/Config/DmiSystemVendor" value="Checkmk GmbH"/>
        <ExtraDataItem name="VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" value="1.7.6"/>
      </ExtraData>
      <Hardware>
        <CPU count="2">
          <PAE enabled="false"/>
          <LongMode enabled="true"/>
          <X2APIC enabled="true"/>
          <HardwareVirtExLargePages enabled="false"/>
        </CPU>
        <Memory RAMSize="4096"/>
        <Firmware type="EFI"/>
        <BIOS>
          <IOAPIC enabled="true"/>
        </BIOS>
        <Network>
          <Adapter MACAddress="080027D5EFE7" enabled="true" slot="0" type="82545EM">
            <DisabledModes>
              <InternalNetwork name="intnet"/>
              <NATNetwork name="NatNetwork"/>
            </DisabledModes>
            <BridgedInterface/>
          </Adapter>
        </Network>
        <AudioAdapter driver="Null" enabled="false"/>
        <Clipboard/>
        <GuestProperties>
          <GuestProperty flags="" name="/VirtualBox/GuestAdd/CheckHostVersion" timestamp="1694544339770206000" value="0"/>
        </GuestProperties>
      </Hardware>
      <StorageControllers>
        <StorageController PortCount="1" name="SATA" type="AHCI">
          <AttachedDevice device="0" hotpluggable="false" port="0" type="HardDisk">
            <Image uuid="{67bc42ba-f7a2-4da7-b0a1-d3a2675a0067}"/>
          </AttachedDevice>
          <AttachedDevice device="0" hotpluggable="false" port="1" type="HardDisk">
            <Image uuid="{bc4b1fb8-b7b7-416d-9228-1c640413d1bd}"/>
          </AttachedDevice>
        </StorageController>
      </StorageControllers>
    </vbox:Machine>
  </VirtualSystem>
</Envelope>
                                                     

Find and correct the HostResource parameters

This is under Envelope > VirtualSystem > VirtualHardwareSection > Item, where you’ll find one block per mounted disk.

The “error” is in the HostResource part of the disk configuration. Nutanix expectes the format of that identifier to be ovf:/disk/vmdisk1 instead of /disk/vmdisk1 (which is default in some other applications, VirtualBox for example)

See examples below for how to correct the syntax for Nutanix

<!-- Before -->
 <Item>
    <rasd:AddressOnParent>0</rasd:AddressOnParent>
    <rasd:Caption>disk1</rasd:Caption>
    <rasd:Description>Disk Image</rasd:Description>
    <rasd:ElementName>disk1</rasd:ElementName>
    <rasd:HostResource>/disk/vmdisk1</rasd:HostResource>
    <rasd:InstanceID>4</rasd:InstanceID>
    <rasd:Parent>3</rasd:Parent>
    <rasd:ResourceType>17</rasd:ResourceType>
 </Item>
 <Item>
    <rasd:AddressOnParent>1</rasd:AddressOnParent>
    <rasd:Caption>disk2</rasd:Caption>
    <rasd:Description>Disk Image</rasd:Description>
    <rasd:ElementName>disk2</rasd:ElementName>
    <rasd:HostResource>ovf:/disk/vmdisk2</rasd:HostResource>
    <rasd:InstanceID>5</rasd:InstanceID>
    <rasd:Parent>3</rasd:Parent>
    <rasd:ResourceType>17</rasd:ResourceType>
 </Item>

So the resulting blocks should look like this

<!-- After -->
 <Item>
    <rasd:AddressOnParent>0</rasd:AddressOnParent>
    <rasd:Caption>disk1</rasd:Caption>
    <rasd:Description>Disk Image</rasd:Description>
    <rasd:ElementName>disk1</rasd:ElementName>
    <rasd:HostResource>ovf:/disk/vmdisk1</rasd:HostResource>
    <rasd:InstanceID>4</rasd:InstanceID>
    <rasd:Parent>3</rasd:Parent>
    <rasd:ResourceType>17</rasd:ResourceType>
 </Item>
 <Item>
    <rasd:AddressOnParent>1</rasd:AddressOnParent>
    <rasd:Caption>disk2</rasd:Caption>
    <rasd:Description>Disk Image</rasd:Description>
    <rasd:ElementName>disk2</rasd:ElementName>
    <rasd:HostResource>ovf:/disk/vmdisk2</rasd:HostResource>
    <rasd:InstanceID>5</rasd:InstanceID>
    <rasd:Parent>3</rasd:Parent>
    <rasd:ResourceType>17</rasd:ResourceType>
 </Item>

Fix the checksums

After saving and re-adding the above file to the archive, you also need to recalculate the checksum for the ovf file. These checksums are stored in the .mf-file

For linux, this is done with:

sha1sum 

Take the resulting checksum and replace the one on the .ovf-row in the .mf-file

SHA1(virt1-1.7.6.ovf)= a7194c2f902c3ddff7a4e4f43b0fa5a5445f3f95
SHA1(virt1-1.7.6-disk1.vmdk)= 82c43615bf9b2d9d2ccef1073661cb5d3b7bb358
SHA1(virt1-1.7.6-disk2.vmdk)= aa2c71125d032cedca691bcf6b61b1cea7c3b004

Then, save and re-add the .mf-file to the archive.

That should be all, now you can upload your .ova-file to Nutanix!

Leave a comment

Your email address will not be published. Required fields are marked *