pyvmomi-community-samples icon indicating copy to clipboard operation
pyvmomi-community-samples copied to clipboard

NoPermission error while trying to set encryption policy with administrator user

Open deepaliamali opened this issue 2 years ago • 0 comments

Describe the bug

I'm trying to set default encryption policy "VM Encryption Policy" to a VM using community sample script. The script completes without any issues. On vCenter UI I see the error "Permission to perform this operation was denied. NoPermission.message.format" I can set the other storage policies correctly to the VM where encryption is not involved. I can perform the same operations using powerCLI scripts with the same user. the pyvmomi library I'm using in on Python2 and is of version : 6.7.1

I was not able to get the information related to the mentioned error in vCenter logs. Can someone point me to correct direction for the logs and possible reason of this issue.

Screenshot 2023-06-20 at 2 27 44 PM

Update

Issue still persists With python3 and pyvmomi version being 8.0.0.1.2

Reproduction steps

  1. Connected to vCenter server.
  2. Got the vm object I wanted to set encryption policy for.
  3. set storage policy for the VM with ReconfigVM_Task on VirtualMachine Managed Object.

Expected behavior

Encryption policy should be applied to VM.

Additional context

No response

deepaliamali avatar Jun 20 '23 09:06 deepaliamali