物理直连的两台ESXi服务器间虚拟机(VM)迁移与副本同步方法咨询
物理直连的两台ESXi服务器间虚拟机(VM)迁移与副本同步方法咨询
Hey there! Let's walk through how to copy and sync your VMs between those two directly connected PowerEdge T440s running ESXi 7 Update 2, since you mentioned you don't see the migrate button and want a straightforward way to keep your VMs identical.
First, why you don't see the "Migrate" button
The vMotion migrate button you've seen in videos requires VMware vCenter Server to manage your ESXi hosts as a cluster. Since you're working with standalone ESXi hosts (no vCenter), that option isn't available by default—totally normal!
Method 1: Copy VM files directly via the ESXi Host Client (GUI)
This is the most straightforward approach for beginners:
- Set up the direct connection for storage access
- On both ESXi hosts, create a VMkernel port on your gigabit direct link. Assign static IPs on the same private subnet (e.g., 192.168.100.1 for Host 1, 192.168.100.2 for Host 2) — this lets the hosts communicate directly for storage operations.
- On Host 1, go to Storage > New Storage > Mount Remote Storage, then enter Host 2's VMkernel IP and select its datastore to mount it locally. Repeat this on Host 2 to mount Host 1's datastore.
- Copy the VM folder
- Shut down the VM you want to copy (cold copy is required without vCenter/Storage vMotion).
- On Host 1, navigate to Storage, find the datastore where your VM lives, open its folder, and select the entire VM folder (it contains
.vmx,.vmdk,.nvram, and other critical files). - Copy this folder to the mounted datastore from Host 2.
- Register the VM on Host 2
- On Host 2, go to Virtual Machines > Create/Register VM > Register an existing virtual machine.
- Navigate to the copied VM folder, select the
.vmxfile, and follow the prompts to complete registration. You can choose to generate a new UUID here to avoid conflicts if you ever need to run both VMs at the same time.
Method 2: Fast copy via SSH command line
If you prefer a faster, scriptable approach:
- Enable SSH on both hosts
- On each ESXi host's UI, go to Host > Services, find SSH, start it, and set it to start automatically with the host.
- Copy the VM folder with
scp- SSH into Host 1, then run this command (replace placeholders with your actual storage names and IP):
scp -r /vmfs/volumes/[Host1-Datastore-Name]/Your-VM-Folder/ root@192.168.100.2:/vmfs/volumes/[Host2-Datastore-Name]/ - This directly copies the entire VM folder over the direct gigabit link.
- SSH into Host 1, then run this command (replace placeholders with your actual storage names and IP):
- Register the VM on Host 2
- Same as Step 3 in Method 1 — use the Host Client to register the copied
.vmxfile.
- Same as Step 3 in Method 1 — use the Host Client to register the copied
For ongoing sync (hot fixes, updates)
- For occasional syncs, repeating the above methods works fine. If you want more streamlined updates:
- Consider setting up a shared storage setup: Make one host's datastore accessible to the other via iSCSI (using the direct gigabit link), so both hosts can access the same VM files. Note: You should only run the VM on one host at a time to prevent data corruption.
- For incremental updates after a hotfix, you can copy just the modified
.vmdkdelta files (if you use snapshots) or the updated VM configuration files, instead of the entire VM folder each time.
Key Notes
- Always shut down the VM before copying unless you have vCenter + Storage vMotion (which you don't in this setup) — hot copying without proper tools can lead to corrupted VM files.
- Verify the direct gigabit link is working by pinging between the two VMkernel IPs from each host's ESXi shell.
- When registering the copied VM, generating a new UUID is a good idea if you plan to test both VMs simultaneously, but isn't necessary if you're only running one as a standby.
备注:内容来源于stack exchange,提问作者Brian Karabinchak
相关产品推荐
相关产品推荐

