Migrating existing IT infrastructure to the cloud presents challenges, particularly when moving critical assets like golden images. Golden images are standardized, pre-configured operating systems and application stacks essential for consistent environment provisioning across development, testing, and production. Ensuring the replication of these images in Google Cloud, without losing fidelity or operational efficiency, is a top priority for many enterprises.
Migrate to Virtual Machines provides two primary migration paths that address different use cases: image import and machine image import.
- Image import migrates individual disks, such as operating system or data volumes, into Google Cloud. This method supports rebuilding or maintaining golden images, especially when replicating a consistent base configuration across multiple instances.
- Machine image import captures the entire virtual machine (VM) instance state, including multiple disks, configuration metadata, networking, and startup scripts. This comprehensive solution suits migrating complex workloads that require end-to-end replication.
For more information about the use cases and advantages of image import and machine image import, see Choose your import strategy.
The best migration approach depends on your workload. Some images are straightforward and well-suited for disk-level or image import, such as OS disks, database disks, or file systems. Others, with tighter interdependencies and configuration requirements, benefit from the holistic nature of machine image import. Understanding the distinctions between these options streamlines your cloud migration.
Image import—your precision migration tool
Image import offers a granular approach, focusing on bringing individual virtual disk images into Google Cloud. This migrates the building blocks of your VM instances. These images, usually containing operating systems, then instantiate new VM instances or create persistent disks within Google Cloud.
For more information about image import features, see Image import and machine image import.
Understand disk images
Disk images are versatile tools. You can use them to set up VM instances quickly, back up entire systems for safekeeping, or clone environments to streamline deployment. They are also ideal for testing software or performing system recovery without altering the original setup. For backups, development, or troubleshooting, disk images make managing IT tasks efficient and reliable.
VM disk images are low-level representations of storage volumes. They exist in several formats.
- Raw disk images: raw disk images are uncompressed, direct block-level
copies of entire disk volumes. They offer the highest fidelity but result in
the largest file sizes. Common formats include:
- VMDK (Virtual Machine Disk) - Recommended for faster import
- QCOW
- QCOW2
- QED
- VPC
- VDI
- VHDX
- VHD
- Sparse disk images: sparse disk images optimize storage by only storing used disk blocks. This significantly reduces storage overhead and dynamically expands as data writes. In Google Cloud, operating system and data disks are stored and used as images.
Import a golden image using image import
You can import a virtual disk image to Google Cloud using the Google Cloud console, Google Cloud CLI, or REST API commands. For information about importing images using Google Cloud CLI and REST API commands, see Import a virtual disk image to Google Cloud.
To import a virtual disk image to Google Cloud using the Google Cloud console, use the following steps.
Upload your virtual disk image file to a Cloud Storage bucket. For better performance, we recommend that you upload the virtual disk image file to a bucket in the same cloud region in which you want to create the image.
Open the Image imports tab in Migrate to VMs page in the Google Cloud console.
Click Create Image.
Click Browse to view the list of buckets in your current project. Select the file from which you want to import the image.
Define the rest of characteristics of the image. For more information on the parameters, see Import a virtual disk image.
- Consider using the Generalize feature for Windows images. When a VM instance is created from an image in Windows, unique information adds to that instance. The Generalize process removes this unique data, enabling you to create multiple instances from the same image.
- Use public image families to manage the lifecycle of your images. Ensure that you create new instances from the most up-to-date version of every image family. Add the Family field to a new image to indicate that this is the latest version of the images belonging to that family.
After filling in all the parameter details and options, click Create to initiate the image import process.
After the import job is created, track its status in the Migrate to VMs dashboard.
Once the import job is complete, you'll have a disk-based image.
Machine image import—the holistic migration approach
Machine images offer a comprehensive approach, providing a broader solution compared to focusing solely on individual disks. A machine image captures the configuration of an entire VM instance, including instance settings, network configurations, operating system details, metadata and labels, security configurations, as well as startup and shutdown scripts.
By importing a machine image, you bring a complete and unified blueprint of your VM instance into Google Cloud. This holistic method simplifies the migration of complex workloads, ensuring consistency and reducing the likelihood of errors during deployment.
For more information about machine image import features, see Image import and machine image import.
Import a golden image using machine image import
You can import a machine image to Google Cloud using the Google Cloud console, gcloud CLI, or REST API commands. For information about importing machine images using gcloud CLI and REST API commands, see Import a machine image to Google Cloud.
To import a machine image to Google Cloud using Google Cloud console, use the following steps:
Upload your OVA or OVF file to a Cloud Storage bucket. For better performance, we recommend that you upload the virtual disk image file to a bucket in the same cloud region in which you want to create the image.
Open the Machine image imports tab in Migrate to VMs page in the Google Cloud console.
Click Create Machine Image.
Click Browse to view the list of buckets in your current project. Select the file from which you want to import the image.
Define the rest of characteristics of the image. For more information on the parameters, see Import a machine image.
Consider using the Generalize feature for Windows images. When a VM instance is created from an image in Windows, unique information adds to that instance. The Generalize process removes this unique data, enabling you to create multiple instances from the same image.
After filling in all the parameter details and options, click Create to initiate the image import process.
After the import job is created, track its status in the Migrate to VMs dashboard.
Once the import job is complete, you'll have a machine image.