Cloning/Deploying VMs with the same name fails with error AttemptToFindUniqueDirectoryNameLimitReached
search cancel

Cloning/Deploying VMs with the same name fails with error AttemptToFindUniqueDirectoryNameLimitReached

book

Article ID: 344954

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • Cloning/Deploying VMs beyond 500 on a single datstore with same name fails with the error "com.vmware.vim.vm.error.AttemptToFindUniqueDirectoryNameLimitReached"

  • /var/log/vmware/vpxd/vpxd.log:

2023-04-02T14:13:37.973Z info vpxd[14649] [Originator@6876 sub=VmProv opID=7ddc0822-01] Done undo action vpx.vmprov.MarkOperationInProgress with output: false
2023-04-02T14:13:37.974Z info vpxd[14649] [Originator@6876 sub=VmProv opID=7ddc0822-01] Undo action vpx.vmprov.CreateSnapshot
2023-04-02T14:13:37.974Z info vpxd[14649] [Originator@6876 sub=VmProv opID=7ddc0822-01] Done undo action vpx.vmprov.CreateSnapshot with output:  false
2023-04-02T14:13:37.974Z error vpxd[14649] [Originator@6876 sub=vpxLro opID=7ddc0822-01] [VpxLRO] Unexpected Exception: N3Vim5Fault16CannotCreateFile9ExceptionE(Fault cause: vim.fault.CannotCreateFile
 )
2023-04-02T14:13:37.982Z info vpxd[14649] [Originator@6876 sub=vpxLro opID=7ddc0822-01] [VpxLRO] -- FINISH lro-34659298
2023-04-02T14:13:37.982Z info vpxd[14649] [Originator@6876 sub=Default opID=7ddc0822-01] [VpxLRO] -- ERROR lro-34659298 -- vm-160046 -- vim.VirtualMachine.clone: vim.fault.CannotCreateFile:
 Result:
 (vim.fault.CannotCreateFile) {
    faultCause = (vmodl.MethodFault) null,
    faultMessage = (vmodl.LocalizableMessage) [
       (vmodl.LocalizableMessage) {
          key = "com.vmware.vim.vm.error.AttemptToFindUniqueDirectoryNameLimitReached",
          arg = <unset>,
          message = <unset>
       }
    ],
    file = "ds:///vmfs/volumes/5edcaea9-3e65c7f0-fddd-bc97e145e244/<vm name>_499"

Environment

VMware vCenter Server 7.0.x
VMware vCenter Server 8.0.x
VMware vCenter Server 6.7.x

Resolution

This is an expected behavior and does not affect the functionality

Workaround:
To workaround this issue, recommend either of the options below

  • Limit deploying VMs to 500 with same name on a single datastore
  • Configure different names for the Virtual Machines during deployment or cloning