VMware Communities
bakerjw1
Enthusiast
Enthusiast

How to clone VMWare Workstation VM with PowerShell

We are currently running VMWare workstation 12 Professional.

As part of our process, we build a base operating system, install some applications and run sysprep with generalize and shutdown selected.

From there, we want to clone this base image before pushing it out to test workstations running VMWare Workstation.

Once on the destination workstation, our users will activate the OS, join the VM into a domain and do with it as they please.

There are likely better ways to accomplish this, but I am dealing with paradigms, so I have to work within certain constraints.

Simply put.

What is the best way to clone a VM using powershell?

I have been working with the vmxtoolkit but it appears to not be supported too much any more.

The new-vmxclone parameter config has given me fits.

Any thoughts? Suggestions? Options?

0 Kudos
1 Reply
bakerjw1
Enthusiast
Enthusiast

I finally found a reference to the config file in the GET-VMX applet.

$Current_VMX = get-vmx -path "D:\My_VMs\Desired_VM"

$Current_VMX.Config <- gives me what I needed to know.

And Voila' it does work.

Even though I answered this for myself, does anyone else have other methods of cloning like this?

0 Kudos