• Home
  • About
  • Contact

Restart The User

  • Home
  • About
  • Contact

How To: Rename VMware VMDK Files On A ESX/ESXi Host

Ever need to rename a VMware ESX/ESXi vmdk?  It isn't as easy and right click and rename.  You will need to follow the steps below in order to rename the files and get it boot in VMware.  For obvious reasons, it is best to try this on a test machine first.  Copy all of your steps on a notepad before doing anything, and proof it.  Also, in case you see any strange errors, keep in mind that Linux is case sensitive.

Pre-requisistes:  Putty and Veeam Fast SCP.

SSH into your ESX/ESXi host using Putty

ls (to see what your working on)
cd /vmfs/volumes/STORAGENAME/VMNAME (you may need to search around for this)
ls (to see what your working on.)

mv OLDVM.vmdk NEWVM.vmdk
mv OLDVM-flat.vmdk NEWVM-flat.vmdk

ls (to see what your working on.)

vi NEWVM.vmdk

This brings up the vi editor.  Look for the line that starts with RW, then change the OLDVM.vmdk to NEWVM.vmdk. In vi you will need to hit the letter "a" without the quotes to start the append.  Once you have positioned the cursor properly and modify the name, hit the ESC to exit the append.  To write and quit, type in

:wq

Now you have completed the name change but in order to boot it in VMware, you need to do one more step.  Using the free version of Veeam Fast SCP, browse to your Virtual Machine datastore and edit the OLDVM.vmx file.

Look for the scsi0:0.fileName and change it from the OLDVM to the NEWVM.  Save the change and you're done, your VM is now bootable in VMware!

Alternatively, if you are on ESXi you could use the vmkfstools, but I haven't verified this yet as we are currently on ESXi free version at the moment and I don't have access to those tools.

Tagged with How To.

March 29, 2012 by Michael Virata.
  • March 29, 2012
  • How To
Newer
Older

Restart The User

Making sense of technology through reviews, troubleshooting, tips, and opinions.

​

  • Home
  • About
  • Contact

  • Apple
  • Applications
  • Events
  • Funny
  • Geek Gear
  • Google
  • Hardware
  • How To
  • Interviews
  • Linux
  • Microsoft
  • Movies
  • Music
  • Opinions
  • Podcasts
  • Troubleshooting
  • TV
  • Video Games
  • Videos
  • Vlog