Deploying a VM using a template or clone fails with error "Number of virtual devices exceeds the maximum for a given controller"
search cancel

Deploying a VM using a template or clone fails with error "Number of virtual devices exceeds the maximum for a given controller"

book

Article ID: 417462

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • When deploying a virtual machine from a template, if [Customize this virtual machine's hardware] option is checked, the virtual machine deployment task may fail with the following error even if there are no virtual devices exceeding the limit.

      The number of virtual devices exceeds the maximum for a given controller

  • In the vSphere Client, an * mark is displayed next to the device name that has been changed on the [Customize hardware] screen.



  • In the vCenter /var/log/vmware/vpxd/vpxd.log shows similar entries as below:

    YYYY-MM-DDTHH:MM:SS info vpxd[2330608] [Originator@6876 sub=vpxLro opID=<id>] [VpxLRO] -- BEGIN lro-91036783 -- vm-#### -- vim.VirtualMachine.clone -- ###########
    YYYY-MM-DDTHH:MM:SS info vpxd[2330608] [Originator@6876 sub=VmProv opID=<id>] Applying ConfigSpec (vim.vm.ConfigSpec) {
    --> createDate = "YYYY-MM-DDTHH:MM:SS",
    --> (vim.vm.device.VirtualDeviceSpec) {
    --> operation = "add",
    --> device = (vim.vm.device.VirtualUSBXHCIController) {
    --> key = 14000,
    --> deviceInfo = (vim.Description) {
    --> label = "USB xHCI controller ",
    --> summary = "USB xHCI controller"
    --> },
    --> } to VM ds:///vmfs/volumes/<datastore>/VMName/VMName.vmx on host<IP>
    YYYY-MM-DDTHH:MM:SS error vpxd[2330608] [Originator@6876 sub=VmProv opID=<id>] Get exception while executing action vpx.vmprov.ReconfigureVm:
    --> (vim.fault.TooManyDevices) {
    --> msg = "Number of virtual devices exceeds the maximum for a given controller.",
    --> }

  • In the ESX host var/run/log/hostd.log  shows similar entries as below:

    YYYY-MM-DDTHH:MM:SS info hostd[2102799] [Originator@6876 sub=Vimsvc.TaskManager opID=<id> user=vpxuser:VSPHERE.LOCAL\username] Task Created : haTask-196-vim.VirtualMachine.reconfigure-22592884
    YYYY-MM-DDTHH:MM:SS error hostd[2100632] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<datastore>/VMName/VMName.vmx opID=<id> user=vpxuser:VSPHERE.LOCAL\username] Only one xHCI USB controller is allowed, attempt to reconfigure with more than one xHCI USB controller.
    YYYY-MM-DDTHH:MM:SS warning hostd[2100632] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<datastore_id>/VMName/VMName.vmx opID=<opid> user=vpxuser:VSPHERE.LOCAL\username] Method fault exception during reconfigure: N3Vim5Fault14TooManyDevices9ExceptionE(Fault cause: vim.fault.TooManyDevices
    --> )
    --> [context]zKq7AVICAgAAAEskdwEQaG9zdGQAANJCF2xpYnZtYWNvcmUuc28AAZp27WxpYnZpbS10eXBlcy5zbwCBA4oHAYFD5gcBgYUUCAGByM4DAQIFIs9ob3N0ZAACsLnBApy+wQGjiPECWqBSAMzHLQBUAy4AAhE/Azt9AGxpYnB0aHJlYWQuc28uMAAEbdEObGliYy5zby42AA==[/context]
    YYYY-MM-DDTHH:MM:SS info hostd[2100632] [Originator@6876 sub=Vimsvc.TaskManager opID=<id> user=vpxuser:VSPHERE.LOCAL\username] Task Completed : haTask-196-vim.VirtualMachine.reconfigure-22592884 Status error

  • Same issue can be seen in the create a VM wizard when moving back and forth.

Environment

  • vCenter 8.x
  • vCenter 9.x
  • ESXi 8.x
  • ESX 9.x

Cause

The clone VM wizard reuses the` vm-edit-hardware` and` vm-edit-options`components for the Customize hardware step. However, when these components are part of a wizard page and when moving back and forth to it, some devices are marked as dirty and then are added to the clone spec causing the clone task to fail with errors for too many devices.

Resolution

This is a known issue, currently there is no resolution.

Workaround

If an * mark appears next to unedited devices:

  1. Return to the previous screen and uncheck the [Customize this virtual machine's hardware] option.
  2. Proceed to the next screen.
  3. Return to the previous screen, re-enable the option and proceed with editing.

The issue does not occur as long as you do not return to the previous screen after making edits in [Customize hardware].