Error: "A specified parameter was not correct: spec.sharesInfo.shares" when creating a vApp from OVF
search cancel

Error: "A specified parameter was not correct: spec.sharesInfo.shares" when creating a vApp from OVF

book

Article ID: 405962

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • When creating a vApp using OVF(Tenant Portal > Data Center > vApps > New > Add vApp From OVF) in VMware Cloud Director(VCD),the following error is seen:

    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.6.x
  • VMware Cloud Director 10.5.x

Cause

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

Resolution

Currently there is no resolution.

As the IOPS shares feature is deprecated in VMware Cloud Foundation(VCF) 9.x versions, this issue won't be resolved in any existing/future vSphere/VCD versions.

See Deprecation of default Storage Policy Components for SIOC Storage Policy 

This issue is not seen in VCF Automation 9.1.

Workaround

To workaround the issue, one of the following options can be used:

Workaround 1:

  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


Workaround 2:

This issue occurs when importing an OVF file exported from a virtual machine with IOPS shares set to 1000 in Storage Policy.
Create a virtual machine with a value other than IOPS shares 1000, exporting the vApp, and then importing it.

Additional Information