Hi, during automatic installation of my esx servers and post exec skript I wan't to rename the local datastore of esx 3.5. I tried to find a solution here in the communities and also tried the following commands
vimsh -n -e "/hostsvc/datastore/rename oldname newname"
vmware-vim-cmd hostsvc/datastore/rename oldname newname"
but nothing happens when I use these commands and I get no error message.
Does anyone know what I'm doing wrong and how I can rename local datastores via command line?
Thankx
Frank
We have a set of post-scripts that are executed upon the first reboot after the build, by default the local datastore should be named storage1
You can do the following:
ln -sf $(readlink -f /vmfs/volumes/storage1) /vmfs/volumes/$(hostname -s)-local-storage
or to whatever naming convention you would like
=========================================================================
William Lam
VMware vExpert 2009
It's been a while since I've done this, you could try:
ln -sf `readlink -f /vmfs/volumes/<storagename>` /vmfs/volumes/$HOSTNAME-Local
I believe this will only work on a host that has not yet been to vCenter.
Hope this helps!
Message was edited by: espi3030
I dont know if this can be dont during the install process. You would need to now the name to start with but at that point it wont be generated. I you look when it first boots I think thats when the VMFS is created in a run_once script. Maybe you coudl find that and edit it?
It can be done in the service console as so...
ls -laF /vmfs/volumes/
Note down the id of the volume linked to the datastore you want to rename (e.g. /vmfs/volumes/477c7-634968-3c1a-001...).
rm -rf /vmfs/volumes/oldname
ln -s /vmfs/volumes/477c7-634968-3c1a-001... /vmfs/volumes/newname
</div>
More info if needed... http://www.vmadmin.co.uk/resources/35-esxserver/52-vmfsdatastore
Andy, VMware Certified Professional / VMware vExpert Award 2009
If you found this information useful please award points using the buttons at the top of the page accordingly.
We have a set of post-scripts that are executed upon the first reboot after the build, by default the local datastore should be named storage1
You can do the following:
ln -sf $(readlink -f /vmfs/volumes/storage1) /vmfs/volumes/$(hostname -s)-local-storage
or to whatever naming convention you would like
=========================================================================
William Lam
VMware vExpert 2009