VMware

This Question is Not Answered

1 "correct" answer available (10 pts) 1 "helpful" answer available (6 pts)
6 Replies Last post: Oct 8, 2009 7:04 AM by Dexxt0r  

Set permission on a particular datastore on ESXi posted: Oct 6, 2009 8:08 AM

Click to view Dexxt0r's profile Novice 8 posts since
Jul 6, 2009

Hi all,

I'm developping an application using vSphere SDK for Perl. But i'm struggling with the following problem:

Let's say we have 2 users: A and B. Both have accounts on ESXi. Each user is assigned his own datastore.

When A connects to ESXi by VI Client to upload files to his datastore, he can browse B's datastore and even delete B's files.

What i want is that A can browse only his own datastore.

Anyone have ideas how to do it by using vSphere SDK? Please help!

Best regards,

Anh-Tu


Click to view lamw's profile Champion 2,813 posts since
Nov 27, 2007
I've not played with this specifically, but I think you would just use setEntityPermission with the specific user/role applied to a specific datastore.

=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
vGhetto Script Repository
VMware Code Central - Scripts/Sample code for Developers and Administrators
VMware Developer Comuunity
Twitter: @lamw

http://engineering.ucsb.edu/~duonglt/vmware/vexpert_silver_icon.jpg

If you find this information useful, please award points for "correct" or "helpful".

Click to view lamw's profile Champion 2,813 posts since
Nov 27, 2007
Take a look at this script: setUserDatastorePermission.pl

Make note at the bottom of the document, this was tested only on ESX(i) 4.0 with vCenter 4.0


=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
vGhetto Script Repository
VMware Code Central - Scripts/Sample code for Developers and Administrators
VMware Developer Comuunity
Twitter: @lamw

http://engineering.ucsb.edu/~duonglt/vmware/vexpert_silver_icon.jpg

If you find this information useful, please award points for "correct" or "helpful".

Click to view lamw's profile Champion 2,813 posts since
Nov 27, 2007
So there are two requirements for this, datastore permission was only recently introduced in vSphere 4.0 along with network permissions. This was not something that was available in VI 3.5 and these permissions were maintained at the vCenter server, so you would need to be running vSphere 4.0 (ESX/ESXi and vCenter) for this to work.

=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
vGhetto Script Repository
VMware Code Central - Scripts/Sample code for Developers and Administrators
VMware Developer Comuunity
Twitter: @lamw

http://engineering.ucsb.edu/~duonglt/vmware/vexpert_silver_icon.jpg

If you find this information useful, please award points for "correct" or "helpful".

Developer Social Media

Communities