스팟 VM은 미사용 용량을 대폭 할인된 가격으로 제공합니다.
스팟 VM은 언제든지 선점(종료)할 수 있지만 선점형 TPU와 달리 런타임 기간에는 제한이 없습니다. TPU 스팟 VM을 다시 시작할 수 없으며 선점 후 다시 만들어야 합니다. 스팟 VM에 대한 일반적인 내용은 스팟 VM에 대한 Compute Engine 문서를 참조하세요.
TPU 스팟 VM 만들기
큐에 추가된 리소스를 사용하여 TPU 스팟 VM을 만들 수 있습니다. 그러면 만들기 요청이 큐에 추가되어 TPU 스팟 VM이 사용 가능해지는 대로 용량을 받을 수 있습니다. TPU를 큐에 추가된 리소스로 만드는 것이 가장 좋습니다. 자세한 내용은 큐에 추가된 리소스 사용자 가이드를 참조하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Manage TPU Spot VMs\n===================\n\nSpot VMs make unused capacity available at highly-discounted rates.\nSpot VMs can be preempted (shut down) at any time, but unlike [preemptible\nTPUs](/tpu/docs/preemptible), there is no limit on runtime duration. You can't\nrestart TPU Spot VMs, and you must recreate them after preemption. For\nmore information about Spot VMs in general, see the [Compute Engine\ndocumentation about Spot VMs](/compute/docs/instances/spot).\n| **Note:** TPU Spot VMs only support the [TPU VM architecture](/tpu/docs/system-architecture-tpu-vm#tpu-vm-arch).\n\nCreate TPU Spot VMs\n-------------------\n\nYou can create TPU Spot VMs using queued resources, which adds your\ncreate request to a queue and lets you receive capacity once it becomes\navailable. Creating TPUs as queued resources is a best practice. For more\ninformation, see [Queued resources user guide](/tpu/docs/queued-resources).\n\nThe following example shows how to create TPU Spot VMs using queued\nresources: \n\n### gcloud\n\nAdd the `--spot` flag to the `gcloud compute tpus queued-resources` command: \n\n```bash\ngcloud compute tpus queued-resources create QUEUED_RESOURCE_ID \\\n --node-id=NODE_ID \\\n --zone=europe-west4-a \\\n --accelerator-type=v3-8 \\\n --runtime-version=tpu-vm-tf-2.17.1-pod-pjrt \\\n --spot\n```\n\n### curl\n\nAdd `spot: {}` to the request body: \n\n```bash\ncurl -X POST https://tpu.googleapis.com/v2alpha1/projects/PROJECT_ID/locations/europe-west4-a/queuedResources?queued_resource_id=QUEUED_RESOURCE_ID \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n tpu: {\n node_spec: {\n parent: \"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/\u003cvar translate=\"no\"\u003eeurope-west4-a\u003c/var\u003e\",\n node_id: \"\u003cvar translate=\"no\"\u003eNODE_ID\u003c/var\u003e\",\n node: {\n accelerator_type: \"\u003cvar translate=\"no\"\u003ev3-8\u003c/var\u003e\",\n runtime_version: \"\u003cvar translate=\"no\"\u003etpu-vm-tf-2.17.1-pod-pjrt\u003c/var\u003e\"\n }\n }\n },\n spot: {}\n }'\n```\n\n### Console\n\n1. In the Google Cloud console, go to the **TPUs** page:\n\n [Go to TPUs](https://console.cloud.google.com/compute/tpus)\n2. Click **Create TPU**.\n\n3. In the **Name** field, enter a name for your TPU.\n\n4. In the **Zone** box, select the zone where you want to create the TPU.\n\n5. In the **TPU type** box, select an accelerator type. The accelerator\n type specifies the version and size of the Cloud TPU you want to\n create. For more information about supported accelerator types for each\n TPU version, see [TPU\n versions](/tpu/docs/system-architecture-tpu-vm#versions).\n\n6. In the **TPU software version** box, select a software version. When\n creating a Cloud TPU VM, the TPU software version specifies the\n version of the TPU runtime to install. For more information, see [TPU\n software versions](/tpu/docs/runtimes).\n\n7. Click the **Enable queueing** toggle.\n\n8. In the **Queued resource name** field, enter a name for your queued\n resource request.\n\n9. Expand the **Management** section.\n\n10. Select the **Make this a TPU Spot VM** checkbox.\n\n11. Click **Create**.\n\nYou can also create TPU Spot VMs without using queued resources: \n\n### gcloud\n\nAdd the `--spot` flag to the `gcloud compute tpus tpu-vm` command: \n\n```bash\ngcloud compute tpus tpu-vm create TPU_NAME \\\n --zone=europe-west4-a \\\n --accelerator-type=v3-8 \\\n --version=tpu-vm-tf-2.17.1-pod-pjrt \\\n --spot\n```\n\n### curl\n\nAdd `scheduling_config: {spot: true}` to the request body: \n\n```bash\ncurl -X POST https://tpu.googleapis.com/v2/projects/PROJECT_ID/locations/europe-west4-a/nodes?node_id=TPU_NAME \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n accelerator_type: \"\u003cvar translate=\"no\"\u003ev3-8\u003c/var\u003e\",\n runtime_version: \"\u003cvar translate=\"no\"\u003etpu-vm-tf-2.17.1-pod-pjrt\u003c/var\u003e\",\n network_config: {enable_external_ips: true},\n scheduling_config: {spot: true}\n }'\n```\n\n### Console\n\n1. In the Google Cloud console, go to the **TPUs** page:\n\n [Go to TPUs](https://console.cloud.google.com/compute/tpus)\n2. Click **Create TPU**.\n\n3. In the **Name** field, enter a name for your TPU.\n\n4. In the **Zone** box, select the zone where you want to create the TPU.\n\n5. In the **TPU type** box, select an accelerator type. The accelerator\n type specifies the version and size of the Cloud TPU you want to\n create. For more information about supported accelerator types for each\n TPU version, see [TPU\n versions](/tpu/docs/system-architecture-tpu-vm#versions).\n\n6. In the **TPU software version** box, select a software version. When\n creating a Cloud TPU VM, the TPU software version specifies the\n version of the TPU runtime to install. For more information, see [TPU\n software versions](/tpu/docs/runtimes).\n\n7. Expand the **Management** section.\n\n8. Select the **Make this a TPU Spot VM** checkbox.\n\n9. Click **Create**.\n\nCheck if a TPU VM is a Spot VM\n------------------------------\n\n### gcloud\n\nTo confirm if your TPU VM is a Spot VM, use the describe command: \n\n```bash\ngcloud compute tpus tpu-vm describe TPU_NAME --zone=europe-west4-a\n```\n\nIf the TPU VM is a Spot VM, then the output will include the\n`spot` field set to `true`, similar to the following: \n\n ...\n schedulingConfig:\n spot: true\n ...\n\n### Console\n\n1. In the Google Cloud console, go to the **TPUs** page:\n\n [Go to TPUs](https://console.cloud.google.com/compute/tpus)\n2. Click the name of your Cloud TPU.\n\n If the TPU VM is a Spot VM, then the **Tier** will be\n **Spot VM**.\n\nPricing and quota\n-----------------\n\nPricing for TPU Spot VMs is significantly lower than for on-demand and\nreserved TPUs. For more information about pricing, see [Cloud TPU\npricing](/tpu/pricing).\n\nYou need preemptible quota to use TPU Spot VMs. For more information,\nsee [Quotas](/tpu/docs/quota)."]]