Copy VM between two ESXi servers, without shared storage

The vmware ovftool tool can be used to copy a VM between two ESXi servers which are not connected via shared storage. This comes in handy in a home lab environment. In the example below I am copying the VM “WIN10” to another ESXi host on my home network.

[root@mysql04p ~] ovftool -ds=datastore1 vi://root@172.16.1.11/WIN10 vi://root@172.16.1.12

Enter login information for source vi://172.16.1.11/
Username: root
Password: ********
Opening VI source: vi://root@172.16.1.11:443/WIN10
Enter login information for target vi://172.16.1.12/
Username: root
Password: ********
Opening VI target: vi://root@172.16.1.12:443/
Deploying to VI: vi://root@172.16.1.12:443/
Transfer Completed
Completed successfully
[root@mysql04p ~]

In my home lab I’ not running a full VMware vsphere cluster. The free version of ESXi does not offer the clone feature. When testing various applications I often run into the requirement to clone VMs on the same ESXi host. This can easily be accomplished with the ovftool. Below I clone the VM “KVM01” to “KVM01v2.”

[root@mysql04p ~] ovftool -ds=datastore1 --name=KVM01v2 --diskMode=thin vi://root@172.16.1.11/KVM01 vi://root@172.16.1.11/

Enter login information for source vi://172.16.1.11/
Username: root
Password: ********
Opening VI source: vi://root@172.16.1.11:443/KVM01
Enter login information for target vi://172.16.1.11/
Username: root
Password: ********
Opening VI target: vi://root@172.16.1.11:443/
Deploying to VI: vi://root@172.16.1.11:443/
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s