VMware Cloud Community
nmedard
Enthusiast
Enthusiast

Copy VM from one ESXi host to another and vice versa

Hi All,

Is there a way like to copy VM from 1stand alone ESXi to another. 

Like a script to copy VM from ESXi1 to ESXi2, and also to copy VM from ESXi2 to ESXi1.

In other word, the esxi1 will act as a backup to the VM hosted on ESXi2, and ESXi2 will act as a backup to the VM hosted on ESXi1

Note: no shared storage.

Thanking you in advance

Nicolas,

0 Kudos
10 Replies
ScreamingSilenc

vSphere Replication is answer to your query.

You can use vSphere Replication if you have an edition of vSphere that includes the vSphere Replication license.

■ vSphere Essentials Plus

■ vSphere Standard

■ vSphere Enterprise

■ vSphere Enterprise Plus

Please consider marking this answer "correct" or "helpful" if you found it useful.
0 Kudos
jpwalsh
Contributor
Contributor

Actually the easiest way to transfer a VM between hosts that arent in the same cluster/datacenter is to just enable SSH on the hosts and copy it. You can do this from the command line with something like SCP or you can download something like WinSCP and use a gui to accomplish that.

Good luck!

0 Kudos
vfk
Expert
Expert

I agree with Mustafa vSphere Replication is the way to go.

--- If you found this or any other answer helpful, please consider the use of the Helpful or Correct buttons to award points. vfk Systems Manager / Technical Architect VCP5-DCV, VCAP5-DCA, vExpert, ITILv3, CCNA, MCP
0 Kudos
JarryG
Expert
Expert

If you can not use replication, then simply copy. I'd recommend to use ghettoVCB script to create compressed archive, and then simply ssh/scp to the other ESXi-host. There you could use ghettoVCB again to unpack and register VM...

_____________________________________________ If you found my answer useful please do *not* mark it as "correct" or "helpful". It is hard to pretend being noob with all those points! 😉
0 Kudos
nmedard
Enthusiast
Enthusiast

Hi All. thank you for your replies.

JarryG

Please tell me more about the ghettoVCB?

1. Can I install it on one existing VM on ESXi1 to backup all VM on ESXi2 to the local datastore of ESXi1 and Vice-versa?

2. Does the ghettoVCB able to run automatically or should I run it manually each time I need it (the client need the backup to be done each day?

Thanking you in advanc

Nicolas

0 Kudos
ch1ta
Hot Shot
Hot Shot

Are those hosts using paid vSphere version? If so, you might want to use some free 3-party backup tool (like VeeamZIP, or similar) to backup VMs located on the one host to the other, and vice versa. Should need be, you would be able previously backed up VMs easily.

We've done something similar previously with the use of VeeamZIP (that creates full independent easily transferred backup of selected VM(s)). Just install the said software, add both host to the console and you're good to good to perform cross-host backups.

Cheers.

0 Kudos
nmedard
Enthusiast
Enthusiast

Actually no paid license is used.

0 Kudos
JarryG
Expert
Expert

ghettoVCB is set of script which must be installed on ESXi (in your case both ESXi1 and ESXi2). You can then call these scripts from ESXi-console, or connect to ESXi using ssh-client running on any VM.

Ad. 1: Basically yes, it is possible: You can use one VM (running on any ESXi) to call this script on any ESXi.

Ad. 2: Yes, you can put this script on crontab (in ESXi) and have it started automatically by cron-daemon, in pre-defined time/date frequency. This configuration then does not depend on any VM-running.

_____________________________________________ If you found my answer useful please do *not* mark it as "correct" or "helpful". It is hard to pretend being noob with all those points! 😉
0 Kudos
nmedard
Enthusiast
Enthusiast

Hi JarryG,

Thank you,

Do you have the installation process to install it on ESXi?

Thank you

0 Kudos
JarryG
Expert
Expert

The whole "installation process" consists of just unpacking of the script and editing its configuration file. It is really very simple, well documented, with clear examples. All you need is to follow official guide:

ghettoVCB.sh - Free alternative for backing up VM's for ESX(i) 3.5, 4.x & 5.x

_____________________________________________ If you found my answer useful please do *not* mark it as "correct" or "helpful". It is hard to pretend being noob with all those points! 😉
0 Kudos