Reference documentation and code samples for the Migrate for Compute Engine V1 API class Google::Cloud::VMMigration::V1::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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Migrate for Compute Engine V1 API - Class Google::Cloud::VMMigration::V1::CloneJob (v2.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.0 (latest)](/ruby/docs/reference/google-cloud-vm_migration-v1/latest/Google-Cloud-VMMigration-V1-CloneJob)\n- [2.1.1](/ruby/docs/reference/google-cloud-vm_migration-v1/2.1.1/Google-Cloud-VMMigration-V1-CloneJob)\n- [2.0.0](/ruby/docs/reference/google-cloud-vm_migration-v1/2.0.0/Google-Cloud-VMMigration-V1-CloneJob)\n- [1.3.0](/ruby/docs/reference/google-cloud-vm_migration-v1/1.3.0/Google-Cloud-VMMigration-V1-CloneJob)\n- [1.2.0](/ruby/docs/reference/google-cloud-vm_migration-v1/1.2.0/Google-Cloud-VMMigration-V1-CloneJob)\n- [1.1.0](/ruby/docs/reference/google-cloud-vm_migration-v1/1.1.0/Google-Cloud-VMMigration-V1-CloneJob)\n- [1.0.2](/ruby/docs/reference/google-cloud-vm_migration-v1/1.0.2/Google-Cloud-VMMigration-V1-CloneJob)\n- [0.9.0](/ruby/docs/reference/google-cloud-vm_migration-v1/0.9.0/Google-Cloud-VMMigration-V1-CloneJob)\n- [0.8.2](/ruby/docs/reference/google-cloud-vm_migration-v1/0.8.2/Google-Cloud-VMMigration-V1-CloneJob)\n- [0.7.0](/ruby/docs/reference/google-cloud-vm_migration-v1/0.7.0/Google-Cloud-VMMigration-V1-CloneJob)\n- [0.6.1](/ruby/docs/reference/google-cloud-vm_migration-v1/0.6.1/Google-Cloud-VMMigration-V1-CloneJob)\n- [0.5.0](/ruby/docs/reference/google-cloud-vm_migration-v1/0.5.0/Google-Cloud-VMMigration-V1-CloneJob)\n- [0.4.0](/ruby/docs/reference/google-cloud-vm_migration-v1/0.4.0/Google-Cloud-VMMigration-V1-CloneJob)\n- [0.3.0](/ruby/docs/reference/google-cloud-vm_migration-v1/0.3.0/Google-Cloud-VMMigration-V1-CloneJob)\n- [0.2.0](/ruby/docs/reference/google-cloud-vm_migration-v1/0.2.0/Google-Cloud-VMMigration-V1-CloneJob)\n- [0.1.1](/ruby/docs/reference/google-cloud-vm_migration-v1/0.1.1/Google-Cloud-VMMigration-V1-CloneJob) \nReference documentation and code samples for the Migrate for Compute Engine V1 API class Google::Cloud::VMMigration::V1::CloneJob.\n\nCloneJob describes the process of creating a clone of a\n[MigratingVM](/ruby/docs/reference/google-cloud-vm_migration-v1/latest/Google-Cloud-VMMigration-V1-MigratingVm \"Google::Cloud::VMMigration::V1::MigratingVm (class)\") to the\nrequested target based on the latest successful uploaded snapshots.\nWhile the migration cycles of a MigratingVm take place, it is possible to\nverify the uploaded VM can be started in the cloud, by creating a clone. The\nclone can be created without any downtime, and it is created using the latest\nsnapshots which are already in the cloud. The cloneJob is only responsible\nfor its work, not its products, which means once it is finished, it will\nnever touch the instance it created. It will only delete it in case of the\nCloneJob being cancelled or upon failure to clone. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #compute_engine_target_details\n\n def compute_engine_target_details() -\u003e ::Google::Cloud::VMMigration::V1::ComputeEngineTargetDetails\n\n**Returns**\n\n- ([::Google::Cloud::VMMigration::V1::ComputeEngineTargetDetails](./Google-Cloud-VMMigration-V1-ComputeEngineTargetDetails)) --- Output only. Details of the target VM in Compute Engine.\n\n### #create_time\n\n def create_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The time the clone job was created (as an API call, not when it was actually created in the target).\n\n### #end_time\n\n def end_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The time the clone job was ended.\n\n### #error\n\n def error() -\u003e ::Google::Rpc::Status\n\n**Returns**\n\n- ([::Google::Rpc::Status](./Google-Rpc-Status)) --- Output only. Provides details for the errors that led to the Clone Job's state.\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. The name of the clone.\n\n### #state\n\n def state() -\u003e ::Google::Cloud::VMMigration::V1::CloneJob::State\n\n**Returns**\n\n- ([::Google::Cloud::VMMigration::V1::CloneJob::State](./Google-Cloud-VMMigration-V1-CloneJob-State)) --- Output only. State of the clone job.\n\n### #state_time\n\n def state_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The time the state was last updated.\n\n### #steps\n\n def steps() -\u003e ::Array\u003c::Google::Cloud::VMMigration::V1::CloneStep\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::VMMigration::V1::CloneStep](./Google-Cloud-VMMigration-V1-CloneStep)\\\u003e) --- Output only. The clone steps list representing its progress."]]