VMWare Virtual Machine Copy Script between "unshared" datastores?

Is there a ESXi CLI script or any method to copy a VM from an internal datastore (drives/vmfs volume within the server) to another internal datastore?
Chadwick MartinAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Datastore browser, cp (command), or vmkfstools.
Chadwick MartinAuthor Commented:
Whatever the easiest to script for a 3rd party software solution (Tidal, for example) to call.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
I would think vmkfstools, there are lots of options, from use at the console, VMA, CLI

see here


it's actually the supported method by VMware.
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Chadwick MartinAuthor Commented:
Thanks Andrew.  I've seen this KB.  This article is for servers (ESXi hosts) that see the datastores (shared). My two hosts have "local, unshared" datastores.  Is there a way to copy a VM (vmdk files) between two "unshared" datastores?
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
are these local datastores on the same host ?

or are we talking different hosts?

e.g. so this is datastore1 to datastore2 on Host A ?

vmkfstools will work, it's a tool to use with vmkfs datastores, local or shared.

see here also

Chadwick MartinAuthor Commented:
Host A has a datastore and Host B has a datastore.  They are not "shared" datastores.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
So you want to go from Host A to Host B ?

in this case it's more complicated and very slow..

the only method is scp file transfer between hosts. (e.g. ssh), this is the only function available.

It would be much quicker to present temporary Nfs datastores (shared) to both hosts.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.