migrating_vms
Creates, updates, deletes, gets or lists a migrating_vms resource.
Overview
| Name | migrating_vms |
| Type | Resource |
| Id | google.vmmigration.migrating_vms |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The identifier of the MigratingVm. |
awsSourceVmDetails | object | Output only. Details of the VM from an AWS source. (id: AwsSourceVmDetails) |
azureSourceVmDetails | object | Output only. Details of the VM from an Azure source. (id: AzureSourceVmDetails) |
computeEngineDisksTargetDefaults | object | Details of the target Persistent Disks in Compute Engine. (id: ComputeEngineDisksTargetDefaults) |
computeEngineTargetDefaults | object | Details of the target VM in Compute Engine. (id: ComputeEngineTargetDefaults) |
createTime | string (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). |
currentSyncInfo | object | Output only. Details of the current running replication cycle. (id: ReplicationCycle) |
cutoverForecast | object | Output only. Provides details of future CutoverJobs of a MigratingVm. Set to empty when cutover forecast is unavailable. (id: CutoverForecast) |
description | string | The description attached to the migrating VM by the user. |
displayName | string | The display name attached to the MigratingVm by the user. |
error | object | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. (id: Status) |
expiration | object | Output only. Provides details about the expiration state of the migrating VM. (id: Expiration) |
group | string | Output only. The group this migrating vm is included in, if any. The group is represented by the full path of the appropriate Group resource. |
labels | object | The labels of the migrating VM. |
lastReplicationCycle | object | Output 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) |
lastSync | object | Output only. The most updated snapshot created time in the source that finished replication. (id: ReplicationSync) |
policy | object | The replication schedule policy. (id: SchedulePolicy) |
recentCloneJobs | array | Output 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. |
recentCutoverJobs | array | Output 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. |
sourceVmId | string | The 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-. |
state | string | Output only. State of the MigratingVm. (STATE_UNSPECIFIED, PENDING, READY, FIRST_SYNC, ACTIVE, CUTTING_OVER, CUTOVER, FINAL_SYNC, PAUSED, FINALIZING, FINALIZED, ERROR, EXPIRED, FINALIZED_EXPIRED) |
stateTime | string (google-datetime) | Output only. The last time the migrating VM state was updated. |
updateTime | string (google-datetime) | Output only. The last time the migrating VM resource was updated. |
vmwareSourceVmDetails | object | Output only. Details of the VM from a Vmware source. (id: VmwareSourceVmDetails) |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The identifier of the MigratingVm. |
awsSourceVmDetails | object | Output only. Details of the VM from an AWS source. (id: AwsSourceVmDetails) |
azureSourceVmDetails | object | Output only. Details of the VM from an Azure source. (id: AzureSourceVmDetails) |
computeEngineDisksTargetDefaults | object | Details of the target Persistent Disks in Compute Engine. (id: ComputeEngineDisksTargetDefaults) |
computeEngineTargetDefaults | object | Details of the target VM in Compute Engine. (id: ComputeEngineTargetDefaults) |
createTime | string (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). |
currentSyncInfo | object | Output only. Details of the current running replication cycle. (id: ReplicationCycle) |
cutoverForecast | object | Output only. Provides details of future CutoverJobs of a MigratingVm. Set to empty when cutover forecast is unavailable. (id: CutoverForecast) |
description | string | The description attached to the migrating VM by the user. |
displayName | string | The display name attached to the MigratingVm by the user. |
error | object | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. (id: Status) |
expiration | object | Output only. Provides details about the expiration state of the migrating VM. (id: Expiration) |
group | string | Output only. The group this migrating vm is included in, if any. The group is represented by the full path of the appropriate Group resource. |
labels | object | The labels of the migrating VM. |
lastReplicationCycle | object | Output 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) |
lastSync | object | Output only. The most updated snapshot created time in the source that finished replication. (id: ReplicationSync) |
policy | object | The replication schedule policy. (id: SchedulePolicy) |
recentCloneJobs | array | Output 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. |
recentCutoverJobs | array | Output 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. |
sourceVmId | string | The 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-. |
state | string | Output only. State of the MigratingVm. (STATE_UNSPECIFIED, PENDING, READY, FIRST_SYNC, ACTIVE, CUTTING_OVER, CUTOVER, FINAL_SYNC, PAUSED, FINALIZING, FINALIZED, ERROR, EXPIRED, FINALIZED_EXPIRED) |
stateTime | string (google-datetime) | Output only. The last time the migrating VM state was updated. |
updateTime | string (google-datetime) | Output only. The last time the migrating VM resource was updated. |
vmwareSourceVmDetails | object | Output only. Details of the VM from a Vmware source. (id: VmwareSourceVmDetails) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, sourcesId, migratingVmsId | view | Gets details of a single MigratingVm. |
list | select | projectsId, locationsId, sourcesId | pageToken, pageSize, filter, orderBy, view | Lists MigratingVms in a given Source. |
create | insert | projectsId, locationsId, sourcesId | migratingVmId, requestId | Creates a new MigratingVm in a given Source. |
patch | update | projectsId, locationsId, sourcesId, migratingVmsId | updateMask, requestId | Updates the parameters of a single MigratingVm. |
delete | delete | projectsId, locationsId, sourcesId, migratingVmsId | Deletes a single MigratingVm. | |
finalize_migration | exec | projectsId, locationsId, sourcesId, migratingVmsId | Marks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done. | |
pause_migration | exec | projectsId, locationsId, sourcesId, migratingVmsId | Pauses 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. | |
extend_migration | exec | projectsId, locationsId, sourcesId, migratingVmsId | Extend the migrating VM time to live. | |
start_migration | exec | projectsId, locationsId, sourcesId, migratingVmsId | Starts migration for a VM. Starts the process of uploading data and creating snapshots, in replication cycles scheduled by the policy. | |
resume_migration | exec | projectsId, locationsId, sourcesId, migratingVmsId | Resumes 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. |
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.
| Name | Datatype | Description |
|---|---|---|
locationsId | string | |
migratingVmsId | string | |
projectsId | string | |
sourcesId | string | |
filter | string | |
migratingVmId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) | |
view | string |
SELECT examples
- get
- list
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 }}'
;
Lists MigratingVms in a given Source.
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 pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND view = '{{ view }}'
;
INSERT examples
- create
- Manifest
Creates a new MigratingVm in a given Source.
INSERT INTO google.vmmigration.migrating_vms (
data__sourceVmId,
data__labels,
data__description,
data__displayName,
data__computeEngineTargetDefaults,
data__computeEngineDisksTargetDefaults,
data__policy,
projectsId,
locationsId,
sourcesId,
migratingVmId,
requestId
)
SELECT
'{{ sourceVmId }}',
'{{ labels }}',
'{{ description }}',
'{{ displayName }}',
'{{ computeEngineTargetDefaults }}',
'{{ computeEngineDisksTargetDefaults }}',
'{{ policy }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ sourcesId }}',
'{{ migratingVmId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: migrating_vms
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the migrating_vms resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the migrating_vms resource.
- name: sourcesId
value: "{{ sourcesId }}"
description: Required parameter for the migrating_vms resource.
- name: sourceVmId
value: "{{ sourceVmId }}"
description: |
The 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-.
- name: labels
value: "{{ labels }}"
description: |
The labels of the migrating VM.
- name: description
value: "{{ description }}"
description: |
The description attached to the migrating VM by the user.
- name: displayName
value: "{{ displayName }}"
description: |
The display name attached to the MigratingVm by the user.
- name: computeEngineTargetDefaults
description: |
Details of the target VM in Compute Engine.
value:
bootConversion: "{{ bootConversion }}"
vmName: "{{ vmName }}"
machineType: "{{ machineType }}"
appliedLicense:
type: "{{ type }}"
osLicense: "{{ osLicense }}"
enableIntegrityMonitoring: {{ enableIntegrityMonitoring }}
licenseType: "{{ licenseType }}"
disks:
- diskName: "{{ diskName }}"
vmAttachmentDetails:
deviceName: "{{ deviceName }}"
additionalLabels: "{{ additionalLabels }}"
diskType: "{{ diskType }}"
encryption:
kmsKey: "{{ kmsKey }}"
sourceDiskNumber: {{ sourceDiskNumber }}
diskType: "{{ diskType }}"
encryption:
kmsKey: "{{ kmsKey }}"
storagePool: "{{ storagePool }}"
targetProject: "{{ targetProject }}"
adaptationModifiers:
- modifier: "{{ modifier }}"
value: "{{ value }}"
networkInterfaces:
- network: "{{ network }}"
subnetwork: "{{ subnetwork }}"
networkTier: "{{ networkTier }}"
internalIp: "{{ internalIp }}"
externalIp: "{{ externalIp }}"
enableVtpm: {{ enableVtpm }}
zone: "{{ zone }}"
diskReplicaZones:
- "{{ diskReplicaZones }}"
hostname: "{{ hostname }}"
metadata: "{{ metadata }}"
networkTags:
- "{{ networkTags }}"
bootOption: "{{ bootOption }}"
secureBoot: {{ secureBoot }}
serviceAccount: "{{ serviceAccount }}"
labels: "{{ labels }}"
additionalLicenses:
- "{{ additionalLicenses }}"
computeScheduling:
minNodeCpus: {{ minNodeCpus }}
onHostMaintenance: "{{ onHostMaintenance }}"
restartType: "{{ restartType }}"
nodeAffinities:
- key: "{{ key }}"
values: "{{ values }}"
operator: "{{ operator }}"
machineTypeSeries: "{{ machineTypeSeries }}"
- name: computeEngineDisksTargetDefaults
description: |
Details of the target Persistent Disks in Compute Engine.
value:
zone: "{{ zone }}"
disksTargetDefaults: "{{ disksTargetDefaults }}"
vmTargetDefaults:
computeScheduling:
minNodeCpus: {{ minNodeCpus }}
onHostMaintenance: "{{ onHostMaintenance }}"
restartType: "{{ restartType }}"
nodeAffinities:
- key: "{{ key }}"
values: "{{ values }}"
operator: "{{ operator }}"
machineTypeSeries: "{{ machineTypeSeries }}"
additionalLicenses:
- "{{ additionalLicenses }}"
labels: "{{ labels }}"
networkInterfaces:
- network: "{{ network }}"
subnetwork: "{{ subnetwork }}"
networkTier: "{{ networkTier }}"
internalIp: "{{ internalIp }}"
externalIp: "{{ externalIp }}"
enableVtpm: {{ enableVtpm }}
serviceAccount: "{{ serviceAccount }}"
enableIntegrityMonitoring: {{ enableIntegrityMonitoring }}
secureBoot: {{ secureBoot }}
bootDiskDefaults:
diskType: "{{ diskType }}"
encryption:
kmsKey: "{{ kmsKey }}"
image:
sourceImage: "{{ sourceImage }}"
deviceName: "{{ deviceName }}"
diskName: "{{ diskName }}"
encryption:
kmsKey: "{{ kmsKey }}"
metadata: "{{ metadata }}"
hostname: "{{ hostname }}"
machineType: "{{ machineType }}"
networkTags:
- "{{ networkTags }}"
vmName: "{{ vmName }}"
targetProject: "{{ targetProject }}"
disks:
- diskName: "{{ diskName }}"
vmAttachmentDetails:
deviceName: "{{ deviceName }}"
additionalLabels: "{{ additionalLabels }}"
diskType: "{{ diskType }}"
encryption:
kmsKey: "{{ kmsKey }}"
sourceDiskNumber: {{ sourceDiskNumber }}
- name: policy
description: |
The replication schedule policy.
value:
idleDuration: "{{ idleDuration }}"
skipOsAdaptation: {{ skipOsAdaptation }}
- name: migratingVmId
value: "{{ migratingVmId }}"
- name: requestId
value: "{{ requestId }}"
UPDATE examples
- patch
Updates the parameters of a single MigratingVm.
UPDATE google.vmmigration.migrating_vms
SET
data__sourceVmId = '{{ sourceVmId }}',
data__labels = '{{ labels }}',
data__description = '{{ description }}',
data__displayName = '{{ displayName }}',
data__computeEngineTargetDefaults = '{{ computeEngineTargetDefaults }}',
data__computeEngineDisksTargetDefaults = '{{ computeEngineDisksTargetDefaults }}',
data__policy = '{{ policy }}'
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
- delete
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
- finalize_migration
- pause_migration
- extend_migration
- start_migration
- resume_migration
Marks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done.
EXEC google.vmmigration.migrating_vms.finalize_migration
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@sourcesId='{{ sourcesId }}' --required,
@migratingVmsId='{{ migratingVmsId }}' --required
;
Pauses 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.
EXEC google.vmmigration.migrating_vms.pause_migration
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@sourcesId='{{ sourcesId }}' --required,
@migratingVmsId='{{ migratingVmsId }}' --required
;
Extend the migrating VM time to live.
EXEC google.vmmigration.migrating_vms.extend_migration
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@sourcesId='{{ sourcesId }}' --required,
@migratingVmsId='{{ migratingVmsId }}' --required
;
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
;
Resumes 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.
EXEC google.vmmigration.migrating_vms.resume_migration
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@sourcesId='{{ sourcesId }}' --required,
@migratingVmsId='{{ migratingVmsId }}' --required
;