mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-06-30 10:33:46 +00:00
22 lines
989 B
Cheetah
22 lines
989 B
Cheetah
---
|
|
layout: page
|
|
page_title: "Clone a VM"
|
|
subcategory: Guides
|
|
description: |-
|
|
This guide explains how to create a VM template and then clone it to another 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 can't be started, but can be cloned multiple times to create new VMs.
|
|
|
|
You can create a template directly in Proxmox 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 the configuration from the template but can be customized further as needed.
|
|
|
|
{{ codefile "terraform" "examples/guides/clone-vm/clone.tf" }}
|