Skip to main content

migrating_vms

Creates, updates, deletes, gets or lists a migrating_vms resource.

Overview

Namemigrating_vms
TypeResource
Idgoogle.vmmigration.migrating_vms

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The identifier of the MigratingVm.
awsSourceVmDetailsobjectOutput only. Details of the VM from an AWS source. (id: AwsSourceVmDetails)
azureSourceVmDetailsobjectOutput only. Details of the VM from an Azure source. (id: AzureSourceVmDetails)
computeEngineDisksTargetDefaultsobjectDetails of the target Persistent Disks in Compute Engine. (id: ComputeEngineDisksTargetDefaults)
computeEngineTargetDefaultsobjectDetails of the target VM in Compute Engine. (id: ComputeEngineTargetDefaults)
createTimestring (google-datetime)Output only. The time the migrating VM was created (this refers to this resource and not to the time it was installed in the source).
currentSyncInfoobjectOutput only. Details of the current running replication cycle. (id: ReplicationCycle)
cutoverForecastobjectOutput only. Provides details of future CutoverJobs of a MigratingVm. Set to empty when cutover forecast is unavailable. (id: CutoverForecast)
descriptionstringThe description attached to the migrating VM by the user.
displayNamestringThe display name attached to the MigratingVm by the user.
errorobjectOutput only. Provides details on the state of the Migrating VM in case of an error in replication. (id: Status)
expirationobjectOutput only. Provides details about the expiration state of the migrating VM. (id: Expiration)
groupstringOutput only. The group this migrating vm is included in, if any. The group is represented by the full path of the appropriate Group resource.
labelsobjectThe labels of the migrating VM.
lastReplicationCycleobjectOutput only. Details of the last replication cycle. This will be updated whenever a replication cycle is finished and is not to be confused with last_sync which is only updated on successful replication cycles. (id: ReplicationCycle)
lastSyncobjectOutput only. The most updated snapshot created time in the source that finished replication. (id: ReplicationSync)
policyobjectThe replication schedule policy. (id: SchedulePolicy)
recentCloneJobsarrayOutput only. The recent clone jobs performed on the migrating VM. This field holds the vm's last completed clone job and the vm's running clone job, if one exists. Note: To have this field populated you need to explicitly request it via the "view" parameter of the Get/List request.
recentCutoverJobsarrayOutput only. The recent cutover jobs performed on the migrating VM. This field holds the vm's last completed cutover job and the vm's running cutover job, if one exists. Note: To have this field populated you need to explicitly request it via the "view" parameter of the Get/List request.
sourceVmIdstringThe unique ID of the VM in the source. The VM's name in vSphere can be changed, so this is not the VM's name but rather its moRef id. This id is of the form vm-.
statestringOutput only. State of the MigratingVm.
stateTimestring (google-datetime)Output only. The last time the migrating VM state was updated.
updateTimestring (google-datetime)Output only. The last time the migrating VM resource was updated.
vmwareSourceVmDetailsobjectOutput only. Details of the VM from a Vmware source. (id: VmwareSourceVmDetails)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, sourcesId, migratingVmsIdviewGets details of a single MigratingVm.
listselectprojectsId, locationsId, sourcesIdpageSize, pageToken, filter, orderBy, viewLists MigratingVms in a given Source.
createinsertprojectsId, locationsId, sourcesIdmigratingVmId, requestIdCreates a new MigratingVm in a given Source.
patchupdateprojectsId, locationsId, sourcesId, migratingVmsIdupdateMask, requestIdUpdates the parameters of a single MigratingVm.
deletedeleteprojectsId, locationsId, sourcesId, migratingVmsIdDeletes a single MigratingVm.
start_migrationexecprojectsId, locationsId, sourcesId, migratingVmsIdStarts migration for a VM. Starts the process of uploading data and creating snapshots, in replication cycles scheduled by the policy.
resume_migrationexecprojectsId, locationsId, sourcesId, migratingVmsIdResumes a migration for a VM. When called on a paused migration, will start the process of uploading data and creating snapshots; when called on a completed cut-over migration, will update the migration to active state and start the process of uploading data and creating snapshots.
pause_migrationexecprojectsId, locationsId, sourcesId, migratingVmsIdPauses a migration for a VM. If cycle tasks are running they will be cancelled, preserving source task data. Further replication cycles will not be triggered while the VM is paused.
finalize_migrationexecprojectsId, locationsId, sourcesId, migratingVmsIdMarks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done.
extend_migrationexecprojectsId, locationsId, sourcesId, migratingVmsIdExtend the migrating VM time to live.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationsIdstring
migratingVmsIdstring
projectsIdstring
sourcesIdstring
filterstring
migratingVmIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)
viewstring

SELECT examples

Gets details of a single MigratingVm.

SELECT
name,
awsSourceVmDetails,
azureSourceVmDetails,
computeEngineDisksTargetDefaults,
computeEngineTargetDefaults,
createTime,
currentSyncInfo,
cutoverForecast,
description,
displayName,
error,
expiration,
group,
labels,
lastReplicationCycle,
lastSync,
policy,
recentCloneJobs,
recentCutoverJobs,
sourceVmId,
state,
stateTime,
updateTime,
vmwareSourceVmDetails
FROM google.vmmigration.migrating_vms
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND sourcesId = '{{ sourcesId }}' -- required
AND migratingVmsId = '{{ migratingVmsId }}' -- required
AND view = '{{ view }}';

INSERT examples

Creates a new MigratingVm in a given Source.

INSERT INTO google.vmmigration.migrating_vms (
data__computeEngineTargetDefaults,
data__computeEngineDisksTargetDefaults,
data__sourceVmId,
data__displayName,
data__description,
data__policy,
data__labels,
projectsId,
locationsId,
sourcesId,
migratingVmId,
requestId
)
SELECT
'{{ computeEngineTargetDefaults }}',
'{{ computeEngineDisksTargetDefaults }}',
'{{ sourceVmId }}',
'{{ displayName }}',
'{{ description }}',
'{{ policy }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ sourcesId }}',
'{{ migratingVmId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single MigratingVm.

UPDATE google.vmmigration.migrating_vms
SET
data__computeEngineTargetDefaults = '{{ computeEngineTargetDefaults }}',
data__computeEngineDisksTargetDefaults = '{{ computeEngineDisksTargetDefaults }}',
data__sourceVmId = '{{ sourceVmId }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__policy = '{{ policy }}',
data__labels = '{{ labels }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND sourcesId = '{{ sourcesId }}' --required
AND migratingVmsId = '{{ migratingVmsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single MigratingVm.

DELETE FROM google.vmmigration.migrating_vms
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND sourcesId = '{{ sourcesId }}' --required
AND migratingVmsId = '{{ migratingVmsId }}' --required;

Lifecycle Methods

Starts migration for a VM. Starts the process of uploading data and creating snapshots, in replication cycles scheduled by the policy.

EXEC google.vmmigration.migrating_vms.start_migration 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@sourcesId='{{ sourcesId }}' --required,
@migratingVmsId='{{ migratingVmsId }}' --required;