Objective: Move a VM from VMware Server to ESX or ESXi
Prequisits: root access via ssh to the ESXi or ESX server (read more about how to get ssh access to ESXi)
- Make a folder with the name of your host (I used “ventoux” in the example) on your ESX VMFS partition to hold the migrated VM. Copy over the .vmx file, nvram, and everything else but the .vmdk files into this folder.
# scp /DATA/vmware/vmmachines/FC7/ventoux/*.vmx* root@10.0.2.31:/vmfs/volumes/VMFS_ESX01_01/telegraph/
# scp /DATA/vmware/vmmachines/FC7/ventoux/*.vmsd root@10.0.2.31:/vmfs/volumes/VMFS_ESX01_01/telegraph/ - Make a second folder (“ventoux_vmdk”) on your VMFS partition and copy over the .vmdk files.
# scp /DATA/vmware/vmmachines/FC7/ventoux/*.vmdk root@10.0.2.31:/vmfs/volumes/VMFS_ESX01_01/ventoux_vmdk - import the vmdks
# for i in /path_to/folder_containing_vmdks/*.vmdk; do vmkfstools -i /path_to/folder2/$i /path_to/folder_containing_vmx/$i; done
My command looked like this:
# for i in /vmfs/volumes/VMFS_ESX01_01/ventoux_vmdk/*.vmdk; do vmkfstools -i /path_to/folder2/$i /vmfs/volumes/VMFS_ESX01_01/ventoux/$i; done - Log into VIC, browse your datastore, go to the folder you created. Right-click on the .vmx file and select add to inventory. That should do it!
Some last notes:
- Don’t forget to upgrade the virtual hardware from the pull-down menu, if necessary.
- Also, you may need to re-install ESX’s VMware tools once it’s running. The virtual LAN adapter sometimes doesn’t convert properly. Just delete it out of the VM and re-add it using the VI Client
- I got this error message when I wanted to edit hthe vm’s properties:
Unable to find memory information for guest OS. Using legacy defaults.Resolution
You need to ensure the virtual machine has an operating system selected in its settings.
To ensure an operating system is selected:
1. Right-click on the virtual machine and click Edit Settings.
The Virtual Machine Properties window opens.
2. Click the Options tab in the Virtual Machine Properties window.
3. Select the appropriate guest operating system.
4. Click OK
Now virtual machine can be edited without receiving that error message.
Leave a Reply