|
Move a VM from VMware Server to ESX or ESXi |
|
|
|
|
Saturday, 13 December 2008 18:58 |
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*
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
:/vmfs/volumes/VMFS_ESX01_01/telegraph/ # scp /DATA/vmware/vmmachines/FC7/ventoux/*.vmsd
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
:/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
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
:/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.
|
Comments
I used Boris' method and it worked, but be aware that the "Storage" indicated in his step 6 is inside the Configuration tab, and inside the box labelled "Hardware"; this is different from seeing name of the ESX machine in the configuration tab, expanding it via the plus icon, then expanding "Storage" (all with Health Status selected in the Hardware box).
If you try to right click after doing that, nothing will happen and you'll be puzzled (as I was).
Happy virtualizing!
Copy all files, including .vmdk to a single directory in the aforementioned path. You may close your SSH connection now.
Open vSphere client and connect to your ESX.
Select your ESX (on LHS menu).
Open Configuration tab.
Click storage in LHS menu.
Right click the storage the copied VM resides on, select "Browse Datastore".
Now find your VM's directory. Right click the .vmx file and select "Add to Inventory".
Voila!
RSS feed for comments to this post