Hello,
Im trying to use the perl script to rename a vmdk file, since vmware
does not allow me to use the vi client for that.
Its a ESX 3.5i host
VI Perl Toolkit version: 1.6
Script 'vmkfstools.pl' version: 3.5 Update 2
Commandline : perl vmkfstools.pl --server SERVER1 -E
"/vmfs/DATASTORE/server/disk_2.vmdk"
"/vmfs/DATASTORE/server/disk_x.vmdk"
after entering username and password for the esx host i get the
following error msg
Can't call method "fault_string" without a package or object reference
at vmkfstools.pl line 551, <STDIN> line 2.
That line 551 reads : VIExt::fail("Unable to move virtual disk : " .
($@->fault_string));
So i have no clue really why it doesnt work, is it just a script error,
or is it a problem with the actual renaming.If the latter
what problem is it?
Any help is appreciated.
Andy
You're not using the right syntax, when using the vCLI's to reference VM's vmdk, it's not the traditional:
/vmfs/volumes/<datastore>/vm/vm.vmdk
The syntax is the following:
\[datastore\] vm/vm.vmdk
So your input should look like:
perl vmkfstools.pl --server SERVER1 -E "\[DATASTORE\] server/disk_2.vmdk" "\[DATASTORE\] server/disk_x.vmdk"
This is also documented in perldoc for vmkfstools and specified in the vCLI documentation. Always good to go through the docs ![]()
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
![]()
If you find this information useful, please award points for "correct" or "helpful".
You're not using the right syntax, when using the vCLI's to reference VM's vmdk, it's not the traditional:
/vmfs/volumes/<datastore>/vm/vm.vmdk
The syntax is the following:
\[datastore\] vm/vm.vmdk
So your input should look like:
perl vmkfstools.pl --server SERVER1 -E "\[DATASTORE\] server/disk_2.vmdk" "\[DATASTORE\] server/disk_x.vmdk"
This is also documented in perldoc for vmkfstools and specified in the vCLI documentation. Always good to go through the docs ![]()
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
![]()
If you find this information useful, please award points for "correct" or "helpful".
Thanks for your help. That worked, I was trying the syntax used in the vmkfstools.pl file
Rename files associated with a specified virtual disk to the specified name:
perl vmkfstools --server
-E /vmfs/volumes/Test/rh6.2.vmdk /vmfs/volumes/Test/testing2.vmdk
