0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-08-22 11:28:33 +00:00
terraform-provider-proxmox/templates/guides/clone-vm.md.tmpl
Pavel Boldyrev c7cd61a2d3
chore(docs): cleanup and update clone-vm example (#2094)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-08-10 20:15:00 -04:00

24 lines
1.1 KiB
Cheetah

---
layout: page
page_title: "Clone a VM"
subcategory: Guides
description: |-
This guide explains how to create a VM template and clone it to a new VM.
---
# Clone a VM
## Create a VM template
VM templates in Proxmox provide an efficient way to create multiple identical VMs. Templates act as a base image that can be cloned to create new VMs, ensuring consistency and reducing the time needed to provision new instances. When a VM is created as a template, it is read-only and cannot be started, but can be cloned multiple times to create new VMs.
You can create a template with Terraform by setting the `template` attribute to `true` when creating the VM resource:
{{ codefile "terraform" "examples/guides/clone-vm/template.tf" }}
Once you have a template, you can clone it to create new VMs. The cloned VMs will inherit all configuration from the template but can be customized further as needed.
{{ codefile "terraform" "examples/guides/clone-vm/clone.tf" }}
Full example is available in the [examples/guides/clone-vm](https://github.com/bpg/terraform-provider-proxmox/tree/main/examples/guides/clone-vm) directory.