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 you perform 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 'x'.

  • In the /opt/vmware/h4/cloud/log/cloud.log file on the destination Cloud Director Replication Management Appliance, you see entries similar to:
2024-05-03 13:42:58.727  WARN - [UI-9141d5d8-fc01-472a-b7a9-35a773185c63-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-9141d5d8-fc01-472a-b7a9-35a773185c63-r24862-qD-qkh-44d3c651-40a7-49a8-a8eb-cb90fbd66b19 ] The operation could not be performed because the device spec is invalid. Invalid operation for device '1'.
vCenter Server task (moref: task-5430845) failed in vCenter Server '<vCenter name>' (########-####-####-####-###########).
 - Invalid operation for device '1'.
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)
at com.vmware.vcloud.client.util.VcdTaskMonitor.pollTasks(VcdTaskMonitor.java:58)
at com.vmware.vcloud.client.util.VcdTaskMonitor.lambda$new$0(VcdTaskMonitor.java:52)
at com.vmware.h4.common.mdc.MDCRunnableWrapper.run(MDCRunnableWrapper.java:30)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)

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 round number in megabytes, resulting in a reconfigure task that attempts to change the disk capacity while associating storage policies during the import into Cloud Director (VCD).

Resolution

This is a known issue affecting Cloud Director 10.5.1.

Currently, there is no resolution.

 

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.