<p>Well, there is no rename, it is a <a href="https://kb.vmware.com/s/article/1029513" rel="nofollow noreferrer">multi-step process</a>, which involves renaming a bunch of entries inside the vmx file, using <a href="https://www.vmware.com/support/ws45/doc/disks_vdiskmanager_eg_ws.html" rel="nofollow noreferrer">vmware-vdiskmanager to rename to vmdk</a> and in general doing a bunch of potentially problematic actions if you don't know what you are doing.</p>

<p>You could probably write a quick Perl script to do all that <a href="https://www.vmware.com/support/developer/viperltoolkit/doc/perl_toolkit_guide.html" rel="nofollow noreferrer">using this guide</a>.</p>

<p>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:</p>

<pre><code>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"
</code></pre>

CC BY-SA 3.0
2017-12-31T04:19:20.543Z
2017-12-31T04:19:20.543Z
Jiri Klouda
<p>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).</p>

<p>For example, Parallels has the <code>prlctl</code> tool, and the process would be something like:</p>

<pre><code>prlctl stop oldname
prlctl set oldname --name newname
prlctl start newname
</code></pre>

CC BY-SA 3.0
2017-09-27T15:29:08.143Z
Just stop, edit the .vmx file and start
Tensibai
CC BY-SA 3.0
2017-09-28T15:16:16.790Z
@Tensibai That only renames the .vmx file and none of the other files within it though?
Rekovni
CC BY-SA 3.0
2017-09-28T15:57:10.427Z
Maybe as inspiration: https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1029513
Tensibai
CC BY-SA 3.0
2017-09-28T16:05:13.713Z
Isn't that for ESX rather than Fusion?
Rekovni
CC BY-SA 3.0
2017-09-29T07:28:23.390Z
that's why I said for inspiration, the files themselves are nearly the same, so the "manual" paragraph describe the needed operations.
Tensibai
<vmware><vmware-fusion>
Rename VM in VMware Fusion via command line
Rekovni
# Rename VM in VMware Fusion via command line

(Asked by: username_0 on 2017-09-27)

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

**Tags:** vmware, vmware-fusion

> **Comments:**
> **username_1**: Just stop, edit the .vmx file and start  
> **username_0**: @username_1 That only renames the .vmx file and none of the other files within it though?  
> **username_1**: Maybe as inspiration: https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1029513  
> **username_0**: Isn't that for ESX rather than Fusion?  
> **username_1**: that's why I said for inspiration, the files themselves are nearly the same, so the "manual" paragraph describe the needed operations.  

---

## 1 answers

### Answer by username_2 on 2017-12-31. Score: 3 | Accepted answer

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"


---

