VMDK file not found after VM copy between hosts

Hi,

So i moved a VM from host1 to host2, following the guide using the --restore-from command.

I created a directory on host 2 with the same name as the original directory on host1, i restored the vm successfully.

However after registering it in vsphere, it is unable to boot as it is unable to find the vm_vmdk file located within datastore/VM_name/vmfs/volumes/datastore/vm_name/vm_name.vmdk

I solved this by editing vm_name.vmx to point directly to the vmdk files for both disks using full path

However, isnt this supposed to be resolved when backing it up? So this manual tasks wouldnt have to be done after restoring the VM?

Regards

This is because the datastore on host1 didn’t exist on host2, so the restore command restored the vmdk file to a different directory. The restore command should have been smart enough to modify the vm_name.vmx for you, but currently this is not implemented.