Skip to content

GCP.VMMigration reference

Source: src/GCP/VMMigration/Group.ts

A VM Migration group that bundles migrating VMs so they can be managed together.

Groups have no labels field — Alchemy stamps ownership into the description so list / nuke can find them. groupId, location, and migrationTargetType are immutable. Display name and description update in place.

Generated name

const group = yield* GCP.VMMigration.Group("Workloads", {
displayName: "workloads",
description: "production vms",
});

Disk-target group

const group = yield* GCP.VMMigration.Group("Disks", {
groupId: "disk-workloads",
migrationTargetType: "MIGRATION_TARGET_TYPE_DISKS",
});

Source: src/GCP/VMMigration/ImageImport.ts

A VM Migration image import from a Cloud Storage file into a Compute Engine disk or machine image.

Image imports are immutable — every field is a replacement trigger. The resource has no labels field; Alchemy stamps ownership into the target details’ labels and description so list / nuke can find them.

Disk image

const target = yield* GCP.VMMigration.Target("Landing");
const image = yield* GCP.VMMigration.ImageImport("Disk", {
cloudStorageUri: "gs://bucket/disk.vmdk",
diskImageTargetDefaults: {
imageName: "imported-disk",
targetProject: target.name,
},
});

Machine image

const image = yield* GCP.VMMigration.ImageImport("Machine", {
cloudStorageUri: "gs://bucket/machine.ova",
machineImageTargetDefaults: {
machineImageName: "imported-machine",
targetProject: target.name,
},
});

Source: src/GCP/VMMigration/Source.ts

A VM Migration source environment (AWS, Azure, or VMware vCenter) that inventories VMs and disks for migration.

sourceId, location, encryption, and the source kind (aws / azure / vmware) plus immutable region/subscription fields are replacement triggers. Description, labels, and credential fields update in place.

AWS source

const source = yield* GCP.VMMigration.Source("Aws", {
aws: {
awsRegion: "us-east-1",
accessKeyCreds: {
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
},
},
labels: { env: "test" },
});

VMware source

const source = yield* GCP.VMMigration.Source("Vcenter", {
vmware: {
vcenterIp: "10.0.0.4",
username: "admin",
password: process.env.VCENTER_PASSWORD,
thumbprint: process.env.VCENTER_THUMBPRINT,
},
});

Source: src/GCP/VMMigration/SourcesDatacenterConnector.ts

A VM Migration datacenter connector registered against a VMware source. The on-prem OVA appliance uses the registration id to bind to this resource.

Connectors have no labels or description — Alchemy stamps ownership into version so list / nuke can find them. The API has no patch method; changing identity or registration replaces the connector.

SourcesDatacenterConnector: Creating a Datacenter Connector

Section titled “SourcesDatacenterConnector: Creating a Datacenter Connector”
const source = yield* GCP.VMMigration.Source("Vcenter", {
vmware: { vcenterIp: "10.0.0.4", username: "admin" },
});
const connector = yield* GCP.VMMigration.SourcesDatacenterConnector(
"Appliance",
{
source: source.name,
version: "1.0.0",
},
);

Source: src/GCP/VMMigration/SourcesDiskMigrationJob.ts

A VM Migration disk migration job that copies an unattached source disk into a Compute Engine persistent disk.

The job has no labels field — Alchemy stamps ownership into targetDetails.labels so list / nuke can find them. Source, job id, and AWS volume id are immutable. Target details update in place.

SourcesDiskMigrationJob: Creating a Disk Migration Job

Section titled “SourcesDiskMigrationJob: Creating a Disk Migration Job”
const job = yield* GCP.VMMigration.SourcesDiskMigrationJob("Boot", {
source: source.name,
awsSourceDiskDetails: { volumeId: "vol-123" },
targetDetails: {
targetProject: target.name,
targetDisk: {
zone: "projects/my-project/locations/us-central1-a",
diskType: "COMPUTE_ENGINE_DISK_TYPE_STANDARD",
diskId: "imported-boot",
},
},
});

Source: src/GCP/VMMigration/SourcesMigratingVm.ts

A VM Migration migrating VM: a source VM plus the replication and target defaults used to clone or cut over into Compute Engine.

Source, migrating VM id, and sourceVmId are immutable. Display name, description, labels, policy, and target defaults update in place.

SourcesMigratingVm: Creating a Migrating VM

Section titled “SourcesMigratingVm: Creating a Migrating VM”
const vm = yield* GCP.VMMigration.SourcesMigratingVm("Web", {
source: source.name,
sourceVmId: "vm-123",
displayName: "web-1",
computeEngineTargetDefaults: {
vmName: "web-1",
machineType: "n2-standard-4",
zone: "us-central1-a",
targetProject: target.name,
},
});

Source: src/GCP/VMMigration/SourcesUtilizationReport.ts

A VM Migration utilization report for selected VMs in a source environment (CPU, memory, disk, network).

Reports have no labels field — Alchemy stamps ownership into the display name so list / nuke can find them. The API has no patch method; changing time frame, VMs, or display name replaces the report.

SourcesUtilizationReport: Creating a Utilization Report

Section titled “SourcesUtilizationReport: Creating a Utilization Report”
const report = yield* GCP.VMMigration.SourcesUtilizationReport("Week", {
source: source.name,
timeFrame: "WEEK",
vms: [{ vmId: "vm-123" }, { vmId: "vm-456" }],
});

Source: src/GCP/VMMigration/Target.ts

A VM Migration target project: the Compute Engine project clones and cutovers land in.

Target projects are global. They have no labels field — Alchemy stamps ownership into the description so list / nuke can find them. The resource id is immutable; project and description update in place.

Point at the current project

const target = yield* GCP.VMMigration.Target("Default", {
description: "this project",
});

Explicit Compute Engine project

const target = yield* GCP.VMMigration.Target("Prod", {
project: "prod-compute",
description: "production landing zone",
});