Failed to clone virtual machine VM_Name to folder 'folder_id' due to permission issue:Permission to perform this operation was denied.
The VM deployment task fails as the user does not have some required privileges, required to deploy the VM from the template.
The command to check the journalctl logs on vCenter Server : journalctl -xe
The following logs are observed in the journalctl logs :
MMM DD HH:MM:SS <vCenter-FQDN> vpxd[6519]: Event [425776148] [1-1] [YYYY-MM-DDTHH:MM:SS.###Z] [vim.event.UserLoginSessionEvent] [info] [DOMAIN\user] [] [425776148] [User DOMAIN\user@##.##.##.## logged in as pyvmomi 9.0.0.0 OSS Python/3.9.18 (Linux; 4.18.0-553.63.1.el8_10.x86_64; x86_64)]MMM DD HH:MM:SS <vCenter-FQDN> vpxd[6519]: Event [425776150] [1-1] [YYYY-MM-DDTHH:MM:SS.###Z] [vim.event.EventEx] [warning] [] [entity] [425776150] [Privilege check failed for user DOMAIN\user for missing permission <Permission name>. Session user performing the check: ]
Assign the necessary privilege to the role linked to the user from within the vCenter Server interface.
The minimum privileges required for a user to deploy the VM using a template are :
Refer to the following document for the minimum privileges : Clone an Existing Virtual Machine
Deploying a VM from template using PowerCLI : New-VM Command | Vmware PowerCLI Reference
Refer to the following document to edit roles and add privileges : Create a vCenter Server Custom Role