4

Is it possible to rename a VM in VMWare Fusion via command line? (ie not clone and then name the new VM and delete the old VM).

For example, Parallels has the prlctl tool, and the process would be something like:

prlctl stop oldname
prlctl set oldname --name newname
prlctl start newname
Rekovni
  • 933
  • 10
  • 24

1 Answers1

3

Well, there is no rename, it is a multi-step process, which involves renaming a bunch of entries inside the vmx file, using vmware-vdiskmanager to rename to vmdk and in general doing a bunch of potentially problematic actions if you don't know what you are doing.

You could probably write a quick Perl script to do all that using this guide.

Another option would be to clone it and delete the original, but it is resource intensive and does way too much work for what it is worth. The code below is untested:

vmrun -T fusion stop "/Volumes/vms/old/old.vmx"
vmrun -T fusion clone "/Volumes/vms/old/old.vmx" "/Volumes/vms/new/new.vmx" full --cloneName=new
vmrun -T fusion deleteVM "/Volumes/vms/old/old.vmx"
vmrun -T fusion start "/Volumes/vms/new/new.vmx"
Jiri Klouda
  • 5,867
  • 1
  • 22
  • 54