---
title: "POST /v1/{+parent}/cloneJobs"
method: POST
path: "/v1/{+parent}/cloneJobs"
tags: ["projects"]
---

# POST /v1/{+parent}/cloneJobs

`POST /v1/{+parent}/cloneJobs`

Initiates a Clone of a specific migrating VM.

## Path parameters

- `parent` string, required

## Query parameters

- `cloneJobId` string
- `requestId` string

## Request body

- CloneJob — CloneJob describes the process of creating a clone of a MigratingVM to the requested target based on the latest successful uploaded snapshots. While the migration cycles of a MigratingVm take place, it is possible to verify the uploaded VM can be started in the cloud, by creating a clone. The clone can be created without any downtime, and it is created using the latest snapshots which are already in the cloud. The cloneJob is only responsible for its work, not its products, which means once it is finished, it will never touch the instance it created. It will only delete it in case of the CloneJob being cancelled or upon failure to clone.
  - `error` Status — 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](https://github.com/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](https://cloud.google.com/apis/design/errors).
    - `details` object[] — A list of messages that carry the error details. There is a common set of message types for APIs to use.
    - `message` string — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
    - `code` integer — The status code, which should be an enum value of google.rpc.Code.
  - `name` string — Output only. The name of the clone.
  - `createTime` string, google-datetime — Output only. The time the clone job was created (as an API call, not when it was actually created in the target).
  - `computeEngineTargetDetails` ComputeEngineTargetDetails — ComputeEngineTargetDetails is a collection of details for creating a VM in a target Compute Engine project.
    - `zone` string — The zone in which to create the VM.
    - `labels` object — A map of labels to associate with the VM.
    - `secureBoot` boolean — Defines whether the instance has Secure Boot enabled. This can be set to true only if the VM boot option is EFI.
    - `diskReplicaZones` string[] — Optional. Additional replica zones of the target regional disks. If this list is not empty a regional disk will be created. The first supported zone would be the one stated in the zone field. The rest are taken from this list. Please refer to the [regional disk creation API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) for further details about regional vs zonal disks. If not specified, a zonal disk will be created in the same zone the VM is created.
    - `networkInterfaces` NetworkInterface[] — List of NICs connected to this VM.
      - `networkTier` 'COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED' | 'NETWORK_TIER_STANDARD' | 'NETWORK_TIER_PREMIUM' — Optional. The networking tier used for optimizing connectivity between instances and systems on the internet. Applies only for external ephemeral IP addresses. If left empty, will default to PREMIUM.
      - `network` string — Optional. The network to connect the NIC to.
      - `subnetwork` string — Optional. The subnetwork to connect the NIC to.
      - `internalIp` string — Optional. The internal IP to define in the NIC. The formats accepted are: `ephemeral` \ ipv4 address \ a named address resource full path.
      - `externalIp` string — Optional. The external IP to define in the NIC.
    - `diskType` 'COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED' | 'COMPUTE_ENGINE_DISK_TYPE_STANDARD' | 'COMPUTE_ENGINE_DISK_TYPE_SSD' | 'COMPUTE_ENGINE_DISK_TYPE_BALANCED' | 'COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED' | 'COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED_HIGH_AVAILABILITY' — The disk type to use in the VM.
    - `machineType` string — The machine type to create the VM with.
    - `licenseType` 'COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT' | 'COMPUTE_ENGINE_LICENSE_TYPE_PAYG' | 'COMPUTE_ENGINE_LICENSE_TYPE_BYOL' — The license type to use in OS adaptation.
    - `serviceAccount` string — The service account to associate the VM with.
    - `computeScheduling` ComputeScheduling — Scheduling information for VM on maintenance/restart behaviour and node allocation in sole tenant nodes. Options for instance behavior when the host machine undergoes maintenance that may temporarily impact instance performance.
      - `onHostMaintenance` 'ON_HOST_MAINTENANCE_UNSPECIFIED' | 'TERMINATE' | 'MIGRATE' — How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.
      - `restartType` 'RESTART_TYPE_UNSPECIFIED' | 'AUTOMATIC_RESTART' | 'NO_AUTOMATIC_RESTART' — Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user). This configuration is identical to `automaticRestart` field in Compute Engine create instance under scheduling. It was changed to an enum (instead of a boolean) to match the default value in Compute Engine which is automatic restart.
      - `minNodeCpus` integer — The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. Ignored if no node_affinites are configured.
      - `nodeAffinities` SchedulingNodeAffinity[] — A set of node affinity and anti-affinity configurations for sole tenant nodes.
        - `key` string — The label key of Node resource to reference.
        - `operator` 'OPERATOR_UNSPECIFIED' | 'IN' | 'NOT_IN' — The operator to use for the node resources specified in the `values` parameter.
        - `values` string[] — Corresponds to the label values of Node resource.
    - `enableIntegrityMonitoring` boolean — Optional. Defines whether the instance has integrity monitoring enabled.
    - `storagePool` string — Optional. The storage pool used for the VM disks. If specified this will be the storage pool in which the disk is created. This is the full path of the storage pool resource, for example: "projects/my-project/zones/us-central1-a/storagePools/my-storage-pool". The storage pool must be in the same project and zone as the target disks. The storage pool's type must match the disk type.
    - `encryption` Encryption — Encryption message describes the details of the applied encryption.
      - `kmsKey` string — Required. The name of the encryption key that is stored in Google Cloud KMS.
    - `adaptationModifiers` AdaptationModifier[] — Optional. Modifiers to be used as configuration of the OS adaptation process.
      - `value` string — Optional. The value of the modifier. The actual value depends on the modifier and can also be empty.
      - `modifier` string — Optional. The modifier name.
    - `appliedLicense` AppliedLicense — AppliedLicense holds the license data returned by adaptation module report.
      - `type` 'TYPE_UNSPECIFIED' | 'NONE' | 'PAYG' | 'BYOL' — The license type that was used in OS adaptation.
      - `osLicense` string — The OS license returned from the adaptation module's report.
    - `project` string — The Google Cloud target project ID or project name.
    - `enableVtpm` boolean — Optional. Defines whether the instance has vTPM enabled.
    - `machineTypeSeries` string — The machine type series to create the VM with.
    - `bootOption` 'COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED' | 'COMPUTE_ENGINE_BOOT_OPTION_EFI' | 'COMPUTE_ENGINE_BOOT_OPTION_BIOS' — The VM Boot Option, as set in the source VM.
    - `bootConversion` 'BOOT_CONVERSION_UNSPECIFIED' | 'NONE' | 'BIOS_TO_EFI' — Optional. By default the virtual machine will keep its existing boot option. Setting this property will trigger an internal process which will convert the virtual machine from using the existing boot option to another.
    - `additionalLicenses` string[] — Additional licenses to assign to the VM.
    - `hostname` string — The hostname to assign to the VM.
    - `metadata` object — The metadata key/value pairs to assign to the VM.
    - `vmName` string — The name of the VM to create.
    - `networkTags` string[] — A list of network tags to associate with the VM.
  - `state` 'STATE_UNSPECIFIED' | 'PENDING' | 'ACTIVE' | 'FAILED' | 'SUCCEEDED' | 'CANCELLED' | 'CANCELLING' | 'ADAPTING_OS' — Output only. State of the clone job.
  - `computeEngineDisksTargetDetails` ComputeEngineDisksTargetDetails — ComputeEngineDisksTargetDetails is a collection of created Persistent Disks details.
    - `disks` PersistentDisk[] — The details of each created Persistent Disk.
      - `sourceDiskNumber` integer — Output only. The ordinal number of the source VM disk.
      - `diskUri` string — Output only. The URI of the Persistent Disk.
    - `disksTargetDetails` DisksMigrationDisksTargetDetails — Details for a disks-only migration.
    - `vmTargetDetails` DisksMigrationVmTargetDetails — Details for the VM created VM as part of disks migration.
      - `vmUri` string — Output only. The URI of the Compute Engine VM.
  - `endTime` string, google-datetime — Output only. The time the clone job was ended.
  - `steps` CloneStep[] — Output only. The clone steps list representing its progress.
    - `adaptingOs` AdaptingOSStep — AdaptingOSStep contains specific step details.
    - `preparingVmDisks` PreparingVMDisksStep — PreparingVMDisksStep contains specific step details.
    - `instantiatingMigratedVm` InstantiatingMigratedVMStep — InstantiatingMigratedVMStep contains specific step details.
    - `startTime` string, google-datetime — The time the step has started.
    - `endTime` string, google-datetime — The time the step has ended.
  - `stateTime` string, google-datetime — Output only. The time the state was last updated.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/vmmigration.md) · [All operations](https://skmtc.net/google/apis/vmmigration/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/vmmigration/versions/c812c34615f3/schema)
