Manually creating a folder fails with "The name <Folder name> already exists" due to an automated task having already created the folder with the same name
search cancel

Manually creating a folder fails with "The name <Folder name> already exists" due to an automated task having already created the folder with the same name

book

Article ID: 415622

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Creating a folder in the vSphere Client triggers the error "The name <Folder name> already exists
  • Reviewing the vCenter Server logs located at /var/log/vmware/vpxd/vpxd.log reveals a vim.fault.DuplicateName exception.
    error vpxd[772476] [Originator@6876 sub=Default opID=######-####-auto-ces-h5:######-2] [VpxLRO] -- ERROR task-4088 -- #####-###-###-###-####(#####-####-####-####-######) -- group-##-- vim.Folder.createFolder: :vim.fault.DuplicateName
    --> Result:
    --> (vim.fault.DuplicateName) {
    -->    faultCause = (vmodl.MethodFault) null,
    -->    faultMessage = <unset>,
    -->    name = "<Folder_Name>",
    -->    object = 'vim.Folder:#####-####-####-####-#####:group-####'
    -->    msg = ""
    --> }
    --> Args:
    -->
    --> Arg name:
    --> "<Folder_Name>"
    
  • Querying the VCDB using the psql utility confirms that the folder is already present in the database.
    /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres -c "select * from vpx_entity where name like '%<Folder_Name>%'"

Cause

A user or an automated provisioning task is attempting to create a new folder using a name that is already in use. The requested folder name conflicts with an existing object in the current inventory hierarchy.

Resolution

To identify the user or automated task that created the conflicting folder, review the vCenter logs:

  • Log in to the vCenter Server via SSH as the root user.
  • Run the following commands to validate the source of the folder creation:

    grep -i '<Account name>' /var/log/vmware/sso/websso.log
    INFO websso[55: tomcat-http--9] [CorId=####-###-###-###-#####] Authentication succeeded for user [Account_name] in tenant [domain.local] with provider [DC_Name] of type [LdapWithAdMappingsProvider] Client: initiator_IP Description: User user@domain@initiator_IP logged in successfully (Response Code: 200)

    grep -i vim.Folder.createFolder /var/log/vpxd/vpxd.log
    info vpxd[06512] [Originator@6876 sub=vpxLro opID=####] [VpxLRO] -- BEGIN task-###-- group-## -- vim.Folder.createFolder -- ######-####-###-###-#####(#####-###-###-###-######) info vpxd[06512] [Originator@6876 sub=vpxLro opID=###] [VpxLRO] -- FINISH task-####

    grep -i isVmFolder envoy-access.log /var/log/envoy/envoy-access.log
    info envoy[2306] [Originator@6876 sub=Default] ###-###-##T##:##:##.##ZPOST /ui/data/propertiesWithParameters/urn:vmomi:Folder:group-n###:####-###-###-###-#####?properties=name,primaryIconId,isRootFolder,isVmFolder,isDatacenterFolder,isNetworkFolder,isStorageFolder,isHostFolder,hasPrivileges HTTP/2 200 via_upstream - ### ### 6 6 0 initiator_IPaddress: Port TLSv1.2 <VC_IPaddress>:443 127.0.0.1:39760 - 127.0.0.1:5090

  • Access the system/application to validate the following:

    • Any scheduled automation tasks are responsible for creating the folder.

    • A third-party application is configured to recreate the folder.

  • (Optional) Consider updating the source application to prevent duplicate folder creation