Copying or migrating VMWare machines from one data store to another is easily done but there are a few things to look out for along the way.
Before you can copy your VMWare machine off the ESXi host you need to allow connections through VMWare’s built in software firewall. Instructions on how to do this are detailed below:
- Select the ESXi host server you would like to manage in the vSphere client.
- Then click on the Configuration Tab > Security Profile > Properties.
- Open any relevant ports ie: SSH, NFS, SAMBA etc.
You should now be able to mount the necessary shares or simply scp the file across the network.
scp -r /vmfs/volumes/datastore/vmware_machine_X/ user@new_server:/path/to/new_home/
Once the VM has been copied or moved, you will need to import the virtual machine into the new ESXi host’s inventory.
- Click on the Configuration Tab > Storage
- Right click on the datastore where you copied the VMWare machine image to and click browse.
- Then navigate to the .vmx configuration file right click and select ‘Add to Inventory’