Error: "The operation could not be performed because the device spec is invalid" when performing a failover of a replication
search cancel

Error: "The operation could not be performed because the device spec is invalid" when performing a failover of a replication

book

Article ID: 367049

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • When performing a failover of a replication in Cloud Director Availability (VCDA), the task fails and you see an error similar to:

The operation could not be performed because the device spec is invalid, Invalid operation for device '#'.

  • In the /opt/vmware/h4/cloud/log/cloud.log file on the destination Cloud Director Replication Management Appliance, you see an entry similar to:
YYYY-MM-DD hh:mm:ss.###  WARN - [UI-########-####-####-####-########5c63-r24862-qD-qkh] [task-poller-2] com.vmware.h4.cloud.job.VmFailoverJob    : Task to import the recovered VC VM into a new vCD vApp has failed.
 
com.vmware.vcloud.client.exception.VcloudException: (Major code = 500, minor code = INTERNAL_SERVER_ERROR) - [ UI-########-####-####-####-########5c63-r24862-qD-qkh-44d3c651-40a7-49a8-a8eb-cb90fbd66b19 ] The operation could not be performed because the device spec is invalid. Invalid operation for device '#'.
vCenter Server task (moref: task-5430845) failed in vCenter Server '<vCenter name>' (########-####-####-####-###########).
 - Invalid operation for device '#'.
at com.vmware.vcloud.client.util.VcdTaskMonitor.lambda$pollTasksImpl$1(VcdTaskMonitor.java:92)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at com.vmware.vcloud.client.util.VcdTaskMonitor.pollTasksImpl(VcdTaskMonitor.java:70)
...
  • In the /var/log/vpxa.log file on destination ESXi host, you see an entry similar to:

    YYYY-MM-DD hh:mm:ss.###Z info vpxa[2104961] [Originator@6876 sub=Default opID=vcd-UI-########-####-####-####-########5c63-r24862-qD-qkh-44d3c651-40a7-49a8-a8eb-cb90fbd66b19;activity=urn:uuid:########-####-####-####-########6246-40-01-5d] [VpxLRO] -- ERROR task-5430845 -- vm-## -- vim.VirtualMachine.reconfigure: vim.fault.InvalidDeviceOperation:
        --> Result:
        --> (vim.fault.InvalidDeviceOperation) {
        -->    faultCause = (vmodl.MethodFault) null,
        -->    faultMessage = (vmodl.LocalizableMessage) [
        -->       (vmodl.LocalizableMessage) {
        -->          key = "msg.hostd.configSpec.diskExtend.hasParent",
        -->          arg = <unset>,
        -->          message = "Disks with parents cannot be expanded."
        -->       }
        -->    ],
        -->    property = "virtualDeviceSpec.device",
        -->    deviceIndex = 0,
        -->    badOp = <unset>,
        -->    badFileOp = <unset>
        -->    msg = "Invalid operation for device '#'."
        --> }
        --> Args:

Environment

  • VMware Cloud Director Availability 4.x
  • VMware Cloud Director 10.5.1

Cause

This issue occurs when a recovered VM's disk size is not a whole integer in megabytes, resulting in a reconfigure task that attempts to change the disk capacity while associating storage policies during the import into VMware Cloud Director (VCD).

For example:

  • When a VM's disk size is configured as 2.83 TB:
    2.83 TB * 1024 * 1024 = 2,967,470.08 MB → As the value in megabytes still contains a decimal value, the reconfigure task is initiated and fails.

  • When a VM's disk size is configured as 2830 GB:
    2830 GB * 1024 = 2,897,920 MB → As the value in megabytes is a whole integer, no reconfigure task is initiated and the import can proceed unimpeded.

Resolution

This issue is resolved in VMware Cloud Director 10.6, available at Broadcom Downloads.

Note: There are interoperability restrictions between VMware Cloud Director Availability and VMware Cloud Director 10.6. For more information, see VMware Cloud Director Availability 4.7.3 Release Notes.

Workaround

To work around this issue, perform the following steps:

  1. Log into the destination vCenter Server where the VMs were recovered to.
  2. In the Hosts and Clusters Inventory view, navigate to the Organization VDC resource pool.
  3. Search for the recovered VM with the same name as the source VM.
  4. Right-click on the VM and select the Edit Settings option.
  5. For any hard disks with a decimal point value, increase the disk size to the next whole gigabyte value.
  6. Navigate to the Cloud Director Availability Portal and re-attempt the failover.