How do I rename a VMWare virtual disk (vmdk) if all I have is VMware Workstation Player for Windows?

5,224

OK, went deep into the webs today and figure this out.

Say you have a vm in a folder c:\myVM and you want to make a copy called c:\newVM.

Inside c:\myVM it looks like this. enter image description here

A. Prep newVM

  1. In VMware Player (referred to as player going forward) run myVM and do a full shutdown using the official OS operation.
    Start > Power > Shutdown.. if Windows 10.
    Apple > Shutdown... if MacOS.
    etc.
  2. Make a copy of the myVM folder and rename it newVM.
  3. Open newVM in player via Player > File > Open... and select Edit virtual machine settings.
  4. Select the Hard Disk device and click Remove.

    vm hard drive setting

  5. Close player.

Your new vm is now ready for renaming.

B. Rename the virtual disk

  1. Go to the VMware sdk site and find the Virtual Disk Development Kit (VDDK) in the Platform and Compute section.
    enter image description here
  2. Download the newest version of the VDDK. Yes, it's painful, but you'll need to create a VMWare account to download files. Sorry.
  3. Inside the downloaded zip file copy the bin folder and paste it into c:\newVM.
  4. Open a command prompt at c:\newVM.
  5. Enter this command vmware-vdiskmanager -n ../myVM.vmdk ../newVM.vmdk

The virtual disk is now renamed.

C. Update all support files with the new name.

Inside c:\newVM.

  1. In a text editor open myVM.vmx and do a find and replace myVM with newVM.
  2. Close and save.
  3. In a text editor open myVM.vmxf and do a find and replace myVM with newVM.
  4. Close and save.
  5. Rename each of the files using newVm.
    It should look similar to this.
    newVM folder structure

D. Mount the new vmdk file.

  1. Open newVM in player via Player > File > Open... and select Edit virtual machine settings.
  2. Click the Add button and select Hard Disk > Next button.
  3. Select SATA > Next button.
  4. Select Use an existing virtual disk > Next button.
  5. Browse to c:\newVM and select newVM.vmdk > Open button.
  6. Finish button > OK button.
  7. Finally, select Play virtual machine.
  8. You will be asked if you moved or copied the vm... select Copied. enter image description here

Done!

The newly named VM should fire up and work as if nothing has changed!

Share:
5,224
GollyJer
Author by

GollyJer

Find out about me on LinkedIn and Facebook.

Updated on September 18, 2022

Comments

  • GollyJer
    GollyJer almost 2 years

    I was provided a virtual machine folder and can use it without issue but now I want to make a copy with a different name.

    How do I do this if all I have is VMware Workstation Player?

  • SqueakyBed
    SqueakyBed over 4 years
    Thank you kind stranger, Your detailed answer saved me a ton of trail and error. Much appreciated.