0

I am using a standalone ESX4i server and I have the VMware CLI tools installed.

I have copied a base build VMDK file which has the OS installed and configured and I need to rename the vmdk file to reflect the server name. I am trying to use the CLI tools and am using esxcli.exe.

I am specifed the IP address of the ESX4i host to connect to, but it is failing. How can I rename the vmdk file by using the esxcli.exe tools. I need to use the vmfkstools.pl but it wont connect to the ESX4i host.

I am using something along the lines of

C:\program files\vmware\vmware vshpere clie\bin\esxcli.exe --server=10.2.2.2 vmfkstools.pl

TIA Oli

1 Answers1

1

The vmkfstools -E parameter allows you to rename VMDKs. It actually looks at the components starting with the base VMDK descriptor (which is a small file with the disk config data) and renames the VMdkname-Flat.vmdk as well.

....\vmkfstools.pl <connection_params> -E /vmfs/volumes/myvmfs/myvmname/vmname.vmdk /vmfs/myvmfs/myvmname/newvmname.vmdk

You can use -E or -renamevirtualdisk they are aliases for the same function.

It is also perfectly safe to use the VI Client's Datastore Browser to do the rename - it hides the fact that the VMDK is comprised of two separate files at the VMFS filesystem level but it still makes sure that any references within the vmdk structure and links to the VMDK get updated properly.

Helvick
  • 19,579
  • 4
  • 37
  • 55