vmrun clone "The snapshot already exists"

1.9k Views Asked by At

I am trying to use the vmrun command line utility to clone the VM on workstation that is currently powered off.

I am using the following command using vmrun --help:

$> *vmrun -T ws "path-to-the-.vmx-file-of-the-vm-that-needsto-be-cloned" "path-to-the- directory-where-the-cloned-vm-should-be-created" full -cloneName=NameOfTheClonedVM*

I keep getting the following error:

Error: The Snapshot already exists

Am I missing something here?

Any help would be much appreciated.

1

There are 1 best solutions below

1
On

This appears to be very old, but I happened to run into this issue - and find the answer - this evening. The help file means exactly what it says:

vmrun clone "Path to vmx file" "Path to destination vmx file" full|linked [-snapshot=Snapshot Name] [-cloneName=Name]

Like me on my initial attempt, you appear to be only specifying the paths rather than the vmx files.

Try this:

vmrun -T ws clone \path\sourcefile.vmx \path\targetfile.vmx full -cloneName=NameOfTheClonedVM

Updated to add the 'clone' directive in the syntax. Note that for this to work, the VM must be powered-down or the optional snapshot directive must be specified and pointed at a snap of the VM in a powered-down state. With the snapshot directive, it would look something like this:

vmrun -T ws clone \path\sourcefile.vmx \path\targetfile.vmx full -snapshot=snapshot2clone -cloneName=NameOfTheClonedVM