GitHub user Drako01 added a comment to the discussion: role with expungeVirtualMachine
There is an additional capability check in the current UI, beyond allowing the API in the role. In [DestroyVM.vue](https://github.com/apache/cloudstack/blob/70860301eb14cb0dc6af1c8546de9997e515d166/ui/src/views/compute/DestroyVM.vue), the Expunge option in the destroy dialog requires both: - `expungeVirtualMachine` in the user's available APIs; and - an Admin role type or the `allowuserexpungerecovervm` capability. That capability is exposed by `listCapabilities`. Have an administrator check the effective `allow.user.expunge.recover.vm` configuration for the affected account. Its [configuration definition](https://github.com/apache/cloudstack/blob/70860301eb14cb0dc6af1c8546de9997e515d166/server/src/main/java/com/cloud/vm/UserVmManager.java) defaults to `false` and supports account scope. Allowing the API through a custom role does not itself enable that configuration. Check `listCapabilities` while signed in as the affected user, rather than comparing only with an administrator session. If it returns `allowuserexpungerecovervm: false`, that explains the missing option despite the role rule. If you mean the separate Expunge action after destruction, its [visibility condition](https://github.com/apache/cloudstack/blob/70860301eb14cb0dc6af1c8546de9997e515d166/ui/src/config/section/compute.js#L453-L476) also checks the VM state (`Destroyed`/`Expunging`) and the capability. The setting permits recovery as well as expunge, so its effective scope should match your account policy. These references are pinned to current source; check the corresponding files for your deployed CloudStack version if its behavior differs. I have not executed an expunge operation. GitHub link: https://github.com/apache/cloudstack/discussions/14674#discussioncomment-19550647 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
