Migrate a guest OS to a new datastore in ESXi 5.1

Published: Tue, 22 Jan 2013 02:10:20 GMT

A step by step guide to moving a virtual machine from one datastore to another in VMware ESXi 5.1 (probably applies to earlier versions too)

I had been running my VMware host with two small physical hard drives, but added a new SATA III 2TB drive which should be a bit faster and give me space for more images. I needed to migrate my existing guests to the new datastore.

In the vSphere Client, expand the host in the left window of the inventory screen and highlight the guest you want to migrate. Click the ‘Summary’ tab in the right pane.

Under ‘Resources’, right-click on the datastore and choose ‘Browse Datastore…’

Browse Datastore...

In the Datastore Browser, click the folder in the left window which contains your guest OS files. Click the ‘Move a file…’ button on the menu bar.

Move a file…

Click ‘Yes’ on the Confirm Move pop-up window.

Confirm move

In the ‘Move Items To…’ dialog, choose the new Datastore (and a directory if you like) and click the ‘Move’ button.

Move To…

The directory will be moved – the progress bar shows how long remains.

Moving progress bar

Once the move is complete, the virtual machine will still be listed in the inventory, but it still links to the old location, so if you try to power it on you will get an error message.

Error message

To resolve this, right-click the guest in the inventory and choose ‘Remove from Inventory’

Remove from Inventory

Highlight the host at the top of the inventory list, then click the ‘Configuration’ tab. You should see all your datastores listed. Right-click the datastore you moved the guest to and choose ‘Browse Datastore…’, open the directory which you moved in the earlier step and locate the .vmx file. Right click it and choose ‘Add to Inventory…’

Add to inventory

Choose a new name for the image if appropriate.

Choose a name

Click ‘Next’ on the Resource Pool Screen.

Resource pool

Click ‘Finish’ on the Ready to Complete screen.

Ready to complete

Your guest will now appear in the inventory list again. When you power the guest on, you will be asked whether you moved or copied the machine. Choose ‘I moved it’ .

Virtual Machine Question

Your guest OS should now boot from the new datastore.

Guest Booting

Let me know in the comments how you get on, or if any of the instructions above are unclear.


Bill B. Ross: Updates file paths to virtual machine files on a datastore after the datastore has been resignatured.
Paul Davis: Why do I continue to see the original datastore in the summary (as well as the new one)? Is there any potential issues that the old datastore is still linked to this vm?

Originally published on my blog at

Home Icon of a house with a precipitous roof Home