ESXI: Move VM between hosts

By | 26/07/2014

Here is a “how-to” to move VMs between ESXi hosts without vCenter and completely for FREE:

Here is the scenario:

We have two ESXi hosts: “esxi-old” and “esxi-new” like below:

We want our VMs (here webserver, devFactory and database) to be copied (or you may call it moved/migrated) to the “esxi-new” host.

 

Follow these steps carefully without skipping any:

A: On esxi-old host

  1. Create a new user on ESXi host (I recommend for user name: ovfuser) follow this tutorial from buildvirtual.net
    • WARNING: Use only alphanumeric characters in the password, else you will get an error! [REF #1]
    • Assign the admin role for this ovfuser
    • Remember to remove this user once all vm copy/migration are done.
  2. Turn off VMs you wish to copy
  3. Edit the settings of each VM, to make sure the CD/DVD Drive is set to client device like “Fig.3”
esxi_iso_asapi_ovftool_operation_canceled_by_user_cause

Fig.3: Set the CD/DVD Drive’s Device Type to “Client Device”

B: On esxi-new host

  1. Create a new user on ESXi host (I recommend for user name: ovfuser) follow this tutorial from buildvirtual.net
    • WARNING: Use only alphanumeric characters in the password, else you will get an error! [REF #1]
    • Assign the admin role for this ovfuser
    • Remember to remove this user once all vm copy/migration are done.
  2. Create a new VM, I’ll call it “AdminEye” using debian as operation system (you can follow the tutorial from enovision.net
  3. On the “AdminEye” machine, install VMWare tools (follow this tutorial from lgallardo.com NOTE to specify the correct file version when running commands)
  4. Your AdminEye machine needs internet access, (follow this post to allow internet access from AdminEye, specially if your server provider forces MAC Address verification per IP (tutorial  you should adapt to your host)
  5. Install OVFTOOL from VMWare:
  6. Get the IP addresses of your ESXi hosts, or their DNS names
  7. Adapt the following command and execute it on the AdminEye machine:

  8. Wait until the copy is finished…
  9. BONUS: You can launch a new terminal and execute another parallel copy (remember step 7 above?)

[REF]:

  • http://blog.itsnotfound.com/2013/05/esxi-copying-a-vm-between-two-hosts/
  • http://andrewaphilp.wordpress.com/2013/09/13/using-ovftool-to-copy-between-hosts-without-vcenter-server/
  • http://fosshelp.blogspot.fr/2013/10/how-to-install-ovftool.html
  • http://www.virtuallyghetto.com/2012/06/how-to-copy-vms-directly-between-esxi.html
  • http://blog.itsnotfound.com/2013/05/esxi-copying-a-vm-between-two-hosts/

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge