[GCP] How To Migrate VMware VMs To Google Cloud With Migrate For Compute Engine
Situation
Client Want Migration VM From VMWare To GCP
Update 2026-11: Migrate for Compute Engine was renamed Migrate to Virtual Machines in July 2022, and the appliance CLI changed from
m4ctom2vm(release notes).
Before Migrate, What Do You Need ?
-
vCenter
-
vSphere
-
GCP Console
-
Enable M4CE API
-
You Have Permission To Control These GCP Service
-
M4CE, VM, Network,
-
-
Reference Doc
How To
Step 1 - Download m4c Instance OVA And Deploy To VMWare
Step 2 - Login To m4c VM And Use Command Register
# After Login To VM
# Check Status
$ m4c status
# Register To M4CE
$ m4c register
After Register, You Can Use m4c status To Confirm
admin@migrate-appliance:~$ m4c status
Cloud APIs network connection: Reachable
Registered: True
Appliance connected to migration service
vCenter address: 0.0.0.0
Vsphere user name is: administrator@domain.com
Project: <your-project>
Location: asia-northeast1
Source: M4CE-Name
Data center connector: M4CE-Name-ufqily
Appliance version: 1.1623761021
Service account: <service-account@google.com>
No http proxy configured
Before Migrate If Your VM Is Linux With lvm Partition Type
-
Make Sure Your
bootHave Enough Space ( > 300 M ) -
Add These Information To System
mkdir -p /etc/google/migrate && ls -la /dev/disk/*/* > /etc/google/migrate/disk-mappings-hints
Go To Migrate For Compute Engine Dashboard
Click VM Need To Migrate And Click ADD MIGRATIONS
Then Go To Migrations Page, Click Start replication And Wait To Complete
And You Can Click Cut Over After replication Complete