Error "A specified parameter was not correct: spec.sharesInfo.shares" when importing OVF to a Cloud Director
search cancel

Error "A specified parameter was not correct: spec.sharesInfo.shares" when importing OVF to a Cloud Director

book

Article ID: 405962

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • The following error occurs when creating a vApp using OVF(Cloud Director Tenant Portal > Compute > vApps > NEW > Add vApp From OVF):
    The operation could not be performed because the argument is invalid. A specified parameter was not correct: spec.sharesInfo.shares - A specified parameter was not correct: spec.sharesInfo.shares
  • The /opt/vmware/vcloud-director/logs/vcloud-container-debug.log file contains entries similar to:
    YYYY-MM-DDTHH:MM:SS,### | ERROR    | task-service-activity-pool-71 | FutureUtil                     | Failed to create VM in Storage Fabric | requestId=########-####-####-####-############,request=POST https://example.com/api/vdc/########-####-####-####-############/action/instantiateOvf,requestTime=1753313976446,remoteAddress=##.####.##.###:50389,userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/201...,accept=application/*+xml;version 38.0 vcd=########-####-####-####-############,task=########-####-####-####-############ activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:########-####-####-####-############)
    com.vmware.ssdc.library.exceptions.VimInvalidArgumentException: The operation could not be performed because the argument is invalid. A specified parameter was not correct: spec.sharesInfo.shares
            at com.vmware.ssdc.library.vim.LmVim.Convert(LmVim.java:262)
            at com.vmware.ssdc.library.vim.LmVim.Convert(LmVim.java:498)
            at com.vmware.vcloud.val.internal.impl.ImportVAppFromOvfActivity$ImportOvfToVcPhase.initiateImportFromOvf(ImportVAppFromOvfActivity.java:854)
            at com.vmware.vcloud.val.internal.impl.ImportVAppFromOvfActivity$ImportOvfToVcPhase.invoke(ImportVAppFromOvfActivity.java:243)
            at com.vmware.vcloud.activity.executors.ActivityRunner.runPhase(ActivityRunner.java:175)
            at com.vmware.vcloud.activity.executors.ActivityRunner.run(ActivityRunner.java:112)
            at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
            at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:829)
    Caused by: (vmodl.fault.InvalidArgument) {
       faultCause = null,
       faultMessage = null,
       invalidProperty = spec.sharesInfo.shares
    }
  • This issue occurs when exporting/importing a virtual machine with IOPS shares 1000 configured in Storage Policy.

Environment

VMware Cloud Director 10.5.x
VMware Cloud Director 10.6.x

Cause

This issue can occur if an incorrect storageIOAllocation.shares.level is specified in the OVF descriptor file being uploaded.

Resolution

To workaround the issue:

  1. Open the ovf file using a text editor.
  2. Edit ovf file.
    Update "storageIOAllocation.shares.level" to normal.
    Before changes:
    <vmw:Config vmw:key="storageIOAllocation.shares.level" vmw:value="custom" ovf:required="false"/>

    After changes:
    <vmw:Config vmw:key="storageIOAllocation.shares.level" vmw:value="normal" ovf:required="false"/>

  3. Save and close the ovf file.
  4. Open the mf file using a text editor.
    mf file: The manifest file which contains a checksum of the ovf and vmdk files)
  5. Edit mf file.
    The manifest file will contain the checksum of the .vmdk and .ovf files.  For example:
    SHA1(example-vm.vmdk)= #########################################
    SHA1(descriptor.ovf)= #########################################
    Update the manifest file with the updated checksum of the updated .ovf file

    In order to calculate the checksum of a file:
    Windows:
    certutil -hashfile descriptor.ovf SHA1

    Linux:
    sha1sum descriptor.ovf

  6. Save and close the mf file.
  7. Import OVF into Cloud Director


Another workaround:

This issue occurs when importing an OVF file exported from a virtual machine with IOPS shares set to 1000 in Storage Policy.
As a workaround, you can avoid this issue by creating a virtual machine with a value other than IOPS shares 1000, exporting the vApp, and then importing it.

Additional Information