So I just launched an ESXi box at work and put in drives after installing vmware and creating 4 virtual machines. I then wanted to move some of the vm’s to a different (bigger) hdd.

Here’s how:

1) In vsphere, right click each VM and select “remove from inventory”.

2) Enable SSH login to ESXi by selecting the server, selecting the “Configruation” tab and selecting “Security Profile” in the Software box. Now select the properties link right justified on the “Services” section. Then select SSH, Options, Start..and you’re good to go!

3) If not done already, import your new hard drives as datastores by going to that same configuration tab as in #2, selecting “Storage” in the Hardware box, and clicking the “Add Storage…” link..It’s self-explanatory.

4) Log in and cd into /vmfs/volumes.. In this directory is your datastores. Simply do the following (based on your configuration):

mv /vmfs/volumes/datastore1/sweetvm /vmfs/volumes/newdatastore

So obviously datastore1 is my default datastore I started with and newdatastore is the new hdd. sweetvm is the directory of my VM containing the essential .vmx file and storage files.

5) Now going back to vsphere, select the “Summary” tab and right click on your new location for your vm(s)…Click “Browse Datastore” and find your .vmx for the vm you have moved. Right-click that and select “Add to inventory”..


Mario Loria is a builder of diverse infrastructure with modern workloads on both bare-metal and cloud platforms. He's traversed roles in system administration, network engineering, and DevOps. You can learn more about him here.