VMware Cloud Community
hack3rcon
Enthusiast
Enthusiast

Live cloning or live migration of a VM

Hello,

There are three PostgreSQL servers. One is primary and the other two are read-only. Something like below:

1000013332.jpg

This database is related to a website where data is regularly entered. The server must be physically moved, and this move will take several hours. I wanted to create a clone of this VM on another host and connect the website to this new VM. Is it possible to live transfer this VM to another host?

Any idea welcomed.

Thank you.

0 Kudos
3 Replies
Brisk
Enthusiast
Enthusiast

If I understand you correctly, you want to move one of your VMs to another physical host. You can achieve this by using the vMotion feature that is present in vSphere.

0 Kudos
venkat_tiyaro
Contributor
Contributor

Yes, it is possible to live transfer a VM to another host. This can be achieved using vSphere Fault Tolerance (FT) or vMotion.

  1. vSphere Fault Tolerance (FT): FT provides continuous availability for mission critical virtual machines by creating and maintaining another VM that is identical and continuously available to replace it in the event of a failover situation. The protected virtual machine is called the Primary VM and the duplicate virtual machine, the Secondary VM, is created and runs on another host. The primary VM is continuously replicated to the secondary VM so that the secondary VM can take over at any point, thereby providing Fault Tolerant protection. A transparent failover occurs if the host running the Primary VM fails, in which case the Secondary VM is immediately activated to replace the Primary VM. A new Secondary VM is started and Fault Tolerance redundancy is reestablished automatically.

  2. vMotion: vMotion transfers two types of data, cold data and hot data. Cold data refers to VM data that does not change during vMotion, such as VM snapshots, non child most delta disks, and vmx logs. Hot data refers to VM data that changes during vMotion, such as memory state, device state, and child most delta disks. If any vmkernel port is configured for provisioning traffic, cold data would traverse through this port. If any vmkernel port is configured for vMotion traffic, hot data would traverse through this port. Some vmkernel port must be configured for vMotion traffic in order to perform vMotion. A successful Long Distance vMotion requires successfully transferring both cold and hot data. Therefore, depending on the which ports was used (provisioning + vMotion or management + vMotion), the traffic must be routable between source and destination hosts on these ports. Both L2 and L3 is supported for VMKernel Ports used for vMotion (cold and hot data transfer), as long as there is connectivity.

Please note that a RTT (round-trip time) latency of 150 milliseconds or less, between hosts is required for Long Distance vMotion. Your license must also cover vMotion across long distances. The long distance vMotion features require an Enterprise Plus license.

 

References:

https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.avail.doc/GUID-623812E6-D253-4FBC-B...

https://kb.vmware.com/s/article/59232?lang=en_US

 

0 Kudos
venkat_tiyaro
Contributor
Contributor

Which one is better:

vSphere Fault Tolerance (FT) and vMotion are both used for maintaining high availability of VMs, but they serve different purposes and have different impacts on the operation of a VM.

  1. vSphere Fault Tolerance (FT): FT is used for mission-critical VMs as it provides continuous availability. It works by creating and maintaining a Secondary VM that is identical to the Primary VM. The Primary VM is continuously replicated to the Secondary VM, which can take over at any point in case of a failover situation. This ensures that users experience no interruption in service and no loss of data. However, FT requires more resources as it maintains a duplicate VM and continuously replicates changes from the Primary VM to the Secondary VM.

  2. vMotion: vMotion is used to migrate running VMs from one host to another without any downtime. It is typically used for load balancing and for performing maintenance on the hosts. Unlike FT, vMotion does not maintain a continuous duplicate of the VM, so it requires fewer resources. However, during the migration process, there is a brief period (usually a few seconds) where the VM is paused while its memory state is transferred to the target host.

In the context of transferring a live VM related to a website with regular data entry to another host, both FT and vMotion could be used, but the best choice depends on the specific requirements and constraints of your situation. If continuous availability (zero downtime) is a critical requirement, FT would be the better choice. If resource usage is a concern, and a brief pause during migration is acceptable, vMotion would be the better choice.

References:

https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.avail.doc/GUID-623812E6-D253-4FBC-B...

https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.networking.doc/GUID-1CAD9F77-71C5-4...

https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.networking.doc/GUID-AA3656B0-005A-4...

 

0 Kudos