ESX Starter and Foundation editions do not provide a built in function to migrate a virtual machine to another ESX host. In the absence of these options, you can do this by logging on to the console operating system using Putty, and then using the SCP utility to copy the VM files. Then on the destination server, add the server to the inventory and mount the VM.
The software you need to do this is already installed on the source and destination server, but has to be enabled in the virtual infrastructure client first on both servers:
- Log into VIC as root
- Click on ESX Server in the tree (top level)
- On the Security tab, click on Security (may be called Security Profile)
- Click on the "Properties ..." link
- Tick the boxes for SSH Client and SSH Server
- Click OK
Log on to the destination server using Putty. We need to find out the real name of the data store directory.
It should look something like this:
The dark blue text is the real name of the directory. The light blue is a symbolic link to that directory. Make a note of the full path of the data store you want to migrate to, e.g:
Now log on to the source server using Putty.
- Before you do anything, remember to shut down the guest VM you are copying
- Navigate into your data store where the source VM is held, e.g:
- Pull up the directory listing using ll (this is an alias of ls -l)
- Again, make sure this VM is powered off
- Use SCP to copy the whole directory to the destination server. The syntax is as follows below.
- Note that your source_directory will typically be the name of your VM
- Your destination is the name of your target ESX server
Using compression is optional, but it will speed things up a bit. You can leave this bit out if you want: -C -o CompressionLevel=6
If you receive this message, say yes:
The authenticity of host 'server (10.11.2.120)' can't be established.
RSA key fingerprint is 49:04:65:6e:20:40:e0:fc:a6:75:14:10:bf:6e:a7:70.
Are you sure you want to continue connecting (yes/no)?
- Once finished, log on to the destination ESX using VIC
- On the summary tab browse the datastore where the VM was copied to
- Right-Click on the vmx file and select 'Add to inventory'
- Fill in the form with relevant values
- Power up the VM and create a new identifier for the VM if prompted
- Check if everything is working correctly
- Backup the VM on the source server before deleting the files
Technorati Tags: ESX Server
Recent Comments