- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SetentityPermissions error: a specified parameter was not correct: entity
With this code:
my $host_view = Vim::find_entity_view( view_type => 'HostSystem' );
$permission = Permission->new(
principal => "$localuser",
group => 'false',
roleId => FindRoleID( $authMgr, $rolename ),
propagate => 'true',
);
@permissions = ($permission);
$authMgr->SetEntityPermissions(
entity => $host_view,
permission => @permissions,
);
I want to assign a local user a custom role (both exist). The role should be assigned on the root level of the host, so that's why I use the view_type HostSystem. What am I doing wrong? Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
and as usual after asking the question I find the answer on my own
https://communities.vmware.com/message/1008552#1008552 It seems I need to apply the permissions on the top folder:
| my $host_view = Vim::find_entity_view( | ||
| view_type => 'Folder', | ||
| filter | => { 'name' => 'ha-folder-root' } | |
| ); |