Error when migrating VM to another resource pool in VMware Cloud Director
search cancel

Error when migrating VM to another resource pool in VMware Cloud Director

book

Article ID: 438336

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • When attempting to relocate a virtual machine to another cluster in VMware Cloud Director (VCD), an error similar to the follow occurs:

    Unable to relocate VM. - Task failed, vc-id={########-####-####-####-############}, task-moref={ManagedObjectReference: type = Task, value = task-######, serverGuid = null}, error={A specified parameter was not correct: spec.deviceChange[2].operation} - The operation could not be performed because the argument is invalid. A specified parameter was not correct: spec.deviceChange[2].operation
    ...
    com.vmware.ssdc.util.RelocateException: Unable to relocate VM. at com.vmware.vcloud.val.internal.impl.RelocateVmActivity$WaitForInventoryUpdatePhase.invoke(RelocateVmActivity.java:397)

  • In VCD, the virtual machine is listed with an E1000 network interface.
  • The underlying virtual machine in vCenter shows the machine possessing a  VMXNET3 network interface.
  • In the VCD logs, the device specification that is generated for vCenter shows items similar to the following:

    An addition of an E1000 NIC:

          (vim.vm.device.VirtualDeviceSpec) {
             dynamicType = null,
             dynamicProperty = null,
             operation = add,
             fileOperation = null,
             device = (vim.vm.device.VirtualE1000) {
             ...

    A removal of a VMXNET3 NIC:

          (vim.vm.device.VirtualDeviceSpec) {
             dynamicType = null,
             dynamicProperty = null,
             operation = remove,
             fileOperation = null,
             device = (vim.vm.device.VirtualVmxnet3) {
             ...

Environment

VMware Cloud Director 10.6.x

Cause

Due to the inconsistency between the network interface in VMware Cloud Director (VCD) and vCenter, VCD is generating a device specification for the relocation that will also update the configuration to align with the expected network interface by removing the incorrect item and adding the correct device. Additions and removals are not supported for the relocation specification and the device changes are causing this error.

Resolution

Reconfigure the VM so that the network adapter in VMware Cloud Director and vCenter are consistent before attempting to relocate the virtual machine.