WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Automation / Quick Tip - Easily move or copy VMs between two Free ESXi hosts?

Quick Tip - Easily move or copy VMs between two Free ESXi hosts?

01.30.2023 by William Lam // 8 Comments

There are many options when it comes to moving or copying Virtual Machine(s) across two ESXi hosts that are fully licensed and can be managed by a vCenter Server, but what about standalone ESXi hosts that only use the Free ESXi Hypervisor license?

Luckily, we have a couple of native solutions from VMware that not only work, but they are completely free to use, which some folks may not even realize!

The first solution is the versatile and popular vCenter Converter utility, which was recently re-released with version v6.3.0 being the latest release. In addition to to using it for Physical-to-Virtual (P2V) and Virtual-to-Virtual (V2V) conversions, you can also use it to transfer offline VMs across ESXi hosts without shared network or storage. For moving a handful of VMs, vCenter Converter is a great solution that provides a graphical interface and can work with hosts licensed with the Free ESXi Hypervisor license. Unlike a typical export or manually copying VM files that must go to an intermediate client, the data transfer is done efficiently between the ESXi hosts and no data is sent to the client running vCenter Converter. The only potential downside is that vCenter Converter does require a Windows system to initiate the conversion, so if you do not have one handy, that maybe the only requirement.


The second solution is also a very versatile tool but may be lesser known on its ability to also transfer VMs between ESXi hosts, which is the OVFTool utility. I actually wrote a blog post about this very topic back in 2012, but the testing that I had done was between two ESXi hosts that was not using Free ESXi Hypervisor license. I was actually not sure if OVFTool could be use for this use case and after a quick test, I can confirm that OVFTool can indeed work between two hosts using the Free ESXi Hypervisor license. While the consumption interface for OVFTool is only command-line, it does support multiple OS platforms (Windows, Linux and macOS) and can easily be scripted for automation purposes. One thing to be aware of is that while no data will be transferred to the client running OVFTool itself, it does function as a proxy between your source and destination ESXi hosts. The client running OVFTool IS in the data path during the transfer but its only for the data to stream from the source->client->destination. Nothing is stored on the client system and you do not need to have the storage capacity of the size of the VM which is a nifty little feature that many people may not be aware of with OVFTool. The syntax is pretty simple to use, with the source URI specifying the ESXi host and the desired VM to transfer and then destination URI of ESXi host as shown in the example below.

ovftool --network='VM Network' --datastore=datastore2 --diskMode=thin 'vi://root:[email protected]/Ubuntu' 'vi://root:[email protected]/'

As mentioned earlier, there are many options to moving and copying VMs across ESXi hosts including some popular 3rd party solutions but I wanted to highlight some potentially lesser known solutions from VMware that also work with Free ESXi Hypervisor license, which is a topic that continues to come up from time to time.

Note: It was asked if VMware Fusion/Workstation could be used to transfer VMs between two Free ESXi hosts and the answer is no. You can only transfer VM to/from Fusion/Workstation but not between two connected ESXi hosts within Fusion/Workstation.

More from my site

  • Quick Tip - How to deploy vCenter Server Appliance (VCSA) to legacy CPU without VMX Unrestricted Guest feature?
  • Quick Tip - Encoding special characters for OVFTool on the command-line
  • Using vCenter Converter 6.3 with vSphere 8 or VMware Cloud on AWS (VMC-A)
  • New vCenter Converter Beta
  • Quick Tip - How to deploy OVF/OVA to multiple networks using OVFTool?

Categories // Automation, ESXi, vSphere 7.0, vSphere 8.0 Tags // free esxi, ovftool, vCenter Converter

Comments

  1. Bob Morrison says

    01/30/2023 at 5:38 pm

    Great ideas. Another way to do it is to setup a simple NFS server or iSCSI VM on one or more of the hosts and share the local storage on each host.

    To move a VM from one host to another, just shut the guest OS on the VM down, register it on the new host and bring it up. When you do this, you’ll be prompted by new ESX host to specify if you moved or copied that VM.

    Just be sure to save or move all your VM’s on the NFS datastore so all the hosts can see them.

    Reply
  2. Greg Messemer says

    01/30/2023 at 6:01 pm

    Nice work as always!

    Reply
    • FAE USER says

      01/31/2023 at 8:15 am

      If I am using single ESXI host without VCSA, can I clone VM using this method (same host copy)?

      Reply
      • William Lam says

        01/31/2023 at 8:39 am

        Give it a try and see 🙂

        Reply
        • FAE USER says

          02/01/2023 at 5:55 am

          Tried was okay. But what is the different between clone using VCSA and the vm converter tool?

          Reply
          • William Lam says

            02/01/2023 at 8:54 am

            No real difference in terms of clone ... but with vCenter Server (assuming you've got the right connectivity and licensing in place), you can perform a live vMotion of the workload. With Converter, you're going to end up with a powered off VM at the destination

  3. Kurt says

    02/23/2023 at 7:57 am

    Will-i-be - you're awesome... for the case of 2x vCSA's that are not licensed to support the cross-vCSA method, is there a simple method to add or change the license to the eval license so we can simply use the cross-vCSA method?

    Reply
    • William Lam says

      02/23/2023 at 7:59 am

      If you've never used the eval license, then it is simply going to Administration->Licensing and just switching it to eval (by default). If you have used it before, then you obviously won't have any more time left since original deployment

      Reply

Thanks for the comment! Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • How to enable passthrough for USB Network Adapters claimed by ESXi CDCE Driver? 03/30/2023
  • Self-Contained & Automated VMware Cloud Foundation (VCF) deployment using new VLC Holodeck Toolkit 03/29/2023
  • ESXi configstorecli enhancement in vSphere 8.0 Update 1 03/28/2023
  • ESXi on Intel NUC 13 Pro (Arena Canyon) 03/27/2023
  • Quick Tip - Enabling ESXi Coredumps to be stored on USB 03/26/2023

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2023

 

Loading Comments...