Virtual machine clone operation using terraform or manual method fails with a ServerFaultCode: NoPermission.|
The error explicitly references resources like RESOURCE (vm-<ID>) and actions such as queryAssociatedProfile or PolicyIDByVirtualDisk.
The deployment may stall after the VM has been successfully cloned but before it is powered on or customized.
Environment
VCF 4.0 TCI 2.2 vCenter 7.0U3.
Cause
The vCenter user account or service account used by Terraform lacks the specific Profile-driven storage privileges required to query or update VM Storage Policies (SPBM) during the disk reconfiguration phase.
Even if the account is assigned a "Global Administrator" role, these specific Storage Policy Based Management (SPBM) permissions may not be explicitly enabled or correctly propagated from the vCenter root level.
Resolution
Include the necessary Profile-driven storage privileges.
Log in to the vSphere Client with administrative credentials.
Navigate to Administration > Access Control > Roles.
Select the role assigned to the Terraform service account and click Edit.