[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-19。"],[],[],null,["# Adapt VM instances to run on Google Cloud\n\nTo function properly on Google Cloud, migrated VMs and imported images require\nchanges to their configuration. These changes are referred to as *OS adaptations*.\nMigrate to Virtual Machines performs OS adaptations automatically at the end of each\nreplication cycle and during the image import process.\n\nOS adaptations are made to both Linux and Windows VMs. At a high level, these adaptations include changes to:\n\n- Enable booting on Google Cloud\n- Enable the serial console\n- Configure network settings\n- Install packages required by the VM to enable Google Cloud features and functionality\n\nThe specific changes for both Linux and Windows VMs are described below.\n\nLinux adaptations\n-----------------\n\nAt the end of each replication cycle for a Linux VM, Migrate to Virtual Machines performs OS adaptations on the replicated VM. These adaptations include:\n\n- Configuring NIC to use DHCP\n\n - If it exists, remove persistent network `udev` rules.\n- If the [VMware Tools/open-vm-tools](https://github.com/vmware/open-vm-tools) service is already installed, disable and try to uninstall it.\n Note: You can safely uninstall the VMware Tools/open-vm-tools service manually post migration, or leave it disabled.\n\n- Set the bootloader to print console logs to serial port 1.\n\n- Validate virtio drivers:\n\n - If virtio drivers are not available in the default kernel, choose an existing kernel which is compatible with virtio driver.\n\n - If virtio drivers are missing from `initrd` then rebuild `initrd` with virtio drivers.\n\n- Add Google Cloud repositories to the repository list. These repositories include:\n\n - \u003chttps://packages.cloud.google.com/yum/\u003e\n - \u003chttps://packages.cloud.google.com/apt/\u003e\n- Install the following Google packages:\n\n - `google-compute-engine` packages for [Compute Engine](/compute) support\n\n - `google-osconfig-agent` package for the [OS Config agent](/compute/docs/instances/os-inventory-management)\n\n - `google-cloud-sdk` package for the [Google Cloud CLI](/sdk/docs)\n\n- Set `systemd.target` to multiuser.\n\n- Where applicable, set `fstab` to use volume UUIDs.\n\n- If target instance license is PAYG:\n\n - Red Hat - Install the `google-rhui-client-rhel` package specific to the Red Hat version.\n\n - SLES - Install Google's region service client packages.\n\n- If the OS is Oracle Linux with a Unbreakable Enterprise Kernel Release 7\n (UEK7) kernel, install the `kernel-uek-modules-extra` package for\n [Google Virtual NIC (gVNIC)](/compute/docs/networking/using-gvnic) support.\n\nThese adaptations require free space on the following partitions:\n\n- Up to 640 MiB in `/root`\n- Up to 128 MiB in `/boot`\n- Up to 64 MiB in `/var`\n- Up to 32 MiB in `/tmp`\n\nWindows adaptations\n-------------------\n\nAt the end of each replication cycle for a Windows VM, Migrate to Virtual Machines performs OS adaptations on the replicated VM. These adaptations include:\n\n- Set bootloader to print console logs to serial port 2.\n\n- Enable RDP.\n\n- Configure the power scheme:\n\n - Disable hibernation mode.\n\n - Set power scheme to balanced.\n\n - Disable `display turn off` in power configurations.\n\n- Disable startup animation.\n\n- Disable CTRL-ALT-DEL.\n\n- If the [VMware Tools/open-vm-tools](https://github.com/vmware/open-vm-tools) service is already installed, disable and try to uninstall it.\n Note: You can safely uninstall the VMware Tools/open-vm-tools service manually post migration, or leave it disabled.\n\n- Set the time:\n\n - Change timezone to UTC.\n\n - Configure NTP.\n\n- Add access to instance metadata:\n\n - Add allow access rule to instance metadata server IP address in Windows firewall.\n\n - Add instance metadata server to hosts file.\n\n- On first boot:\n\n - If target instance license is PAYG (default), then register KMS and Windows activation.\n\n - Configure DHCP settings.\n\n - Install Google [guest packages](/compute/docs/images/guest-environment#windows)\n\nThese adaptations may require up to 1.25 GiB of free space on drive `C`.\n| **Note:** Windows first boot might take a while. If Windows was not gracefully shut down, it may invoke a Check Disk (`chkdsk`) scan before starting. Additionally, setting up network devices for the first time might take several minutes.\n\nAdaptation reports\n------------------\n\nMigrate to Virtual Machines generates adaptation reports during your replication cycles, clones, and cut-over cycles for you to use for troubleshooting, problem solving, and deeper insight into your migration process.\n\nFor more information about adaptation reports, see [Adaptation reports](/migrate/virtual-machines/docs/5.0/migrate/migration-progress-details#adaptation_report)."]]