How to provide a disk with read and write access using powercli command?
You need to create a role with this privilege:
Id : VirtualMachine.Provisioning.DiskRandomAccess
new-virole
then you need to create new permission using this role that has this privilege in it
$privs=Get-VIPrivilege -id VirtualMachine.Provisioning.DiskRandomAccess
New-VIRole -Name My_New_role -Privilege $privs
for example... but this is just to show how can you build new role with this particular priv
Do you mean a vDisk to a VM ?
Isn't that always RW, or what exactly do you mean ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Its a provisioning privilege.The action is to allow disk access.The description of that action is
Open a disk on a virtual machine for random read and write access.used mostly for remote disk mounting.
Its a provisioning privilege.The action is to allow disk access.The description of that action is
Open a disk on a virtual machine for random read and write access.used mostly for remote disk mounting.
To add the disk you can use
$myvm=get-vm 'MyVmToWhichIwantToaddDisk'
new-harddisk -vm $myvm -capacityGB 10 -StorageFormat Thick
or
new-harddisk -vm $myvm -capacityGB 10-ThinProvisioned
if you need think provisioned disk
the rest it's about permissions, if you are administrator and have administrator role then it should be fine. Now the question is do you need help with giving permissions via powercli or just adding the disk to vm
Yes.I need help with giving permissions via powercli.Adding the disk to vm is working fine.
Can you tell exact privilege name ? Like when you are in vsphere client and you open the role settings, which one is it, not the description by in which section is this privilege and what name does it have, also please say which version on virtual center do you use
You will first have to create a role that has the required privilege.
Can you use any of the existing roles in vCenter or do you need to create a new role ?
For both you will at least need an account with administrator authority on vCenter.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
privilege : Allow disk access
vCenter Version : 2.5
I have to create a new role.Readonly role is there.how to give a disk permission with read and write?
You need to create a role with this privilege:
Id : VirtualMachine.Provisioning.DiskRandomAccess
new-virole
then you need to create new permission using this role that has this privilege in it
$privs=Get-VIPrivilege -id VirtualMachine.Provisioning.DiskRandomAccess
New-VIRole -Name My_New_role -Privilege $privs
for example... but this is just to show how can you build new role with this particular priv
okay.I understood.Thanks for your help
for get-viprivilege there is no argument like -id.Can we use -Name instead?
There is an Id parameter. Do a
Get-Help Get-VIPrivilege -Parameter id
Or have a look at the the Get-ViPrivilege cmdlet online reference.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes.I got it.I had seen an older version powercli before.Thanks
Which PowerCLI version are you using ?
Do a
Get-PowerCLIVersion
The latest is 5.1, you should use that version.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I had seen the documentation of powercli version 4.1.Actually i dont have the setup of powercli.