I want to share a LUN to multiple VMs on esx host by creating datastore and then creating virtual disks on this datastore, assign virtual disks to VMs. I know we can do it via vSphere client but I want to know the commands so that I can automate this process.
i) vmkfstools -C vmfs3 -S <datastore name> <device path>
I am getting problem like "permission denied" if I try to create datastore. Is there anything that I am missing here ?
ii) vmkfstools -c 2048m /vmfs/volumes/<datastore-name>/<vdisk-name.vmdk>
creates virtual disk with the given name in the given datastore.
I am able to create virtual disk with this command. How do I assign this virtual disk to a VM ?
Thank you in advance....
Thanks & Regards,
I can suggest this PDF, page 46: http://www.rtfm-ed.co.uk/docs/vmwdocs/ESX3.x-VC2.x-ServiceConsole-Guide.pdf
Or the same by using PERL script: http://communities.vmware.com/docs/DOC-11213
Hope it helps.
iSCSI SAN software