0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-30 10:33:46 +00:00
terraform-provider-proxmox/templates/guides/cloud-image.md.tmpl
joshmcorreia af7b0e7130
fix(docs): typo in cloud-image.md guide, exiting -> existing (#1584)
Signed-off-by: Josh Correia <joshmcorreia@gmail.com>
2024-10-09 12:25:40 -04:00

30 lines
1.6 KiB
Cheetah

---
layout: page
page_title: "Create a VM from a Cloud Image"
subcategory: Guides
description: |-
This guide explains how to create a VM from a cloud image.
---
# Create a VM from a Cloud Image
## Download a public cloud image from URL
Proxmox does not natively support QCOW2 images, but provider can do the conversion for you.
Example of how to create a CentOS 8 VM from a "generic cloud" `qcow2` image. CentOS 8 images are available at [cloud.centos.org](https://cloud.centos.org/centos/8-stream/x86_64/images/):
{{ codefile "terraform" "examples/guides/cloud-image/centos-qcow2/main.tf" }}
Ubuntu cloud images are available at [cloud-images.ubuntu.com](https://cloud-images.ubuntu.com/). Ubuntu cloud images are in `qcow2` format as well, but stored with `.img` extension, so they can be directly uploaded to Proxmox without renaming.
{{ codefile "terraform" "examples/guides/cloud-image/ubuntu-img/main.tf" }}
For [large images](https://registry.terraform.io/providers/bpg/proxmox/latest/docs/resources/virtual_environment_file#important-notes), you may want to use a dedicated temporary directory [configured](https://registry.terraform.io/providers/bpg/proxmox/latest/docs#tmp_dir) for provider via `tmp_dir` attribute, instead of system's default temporary directory. This is especially useful if you are deploying from a container with limited disk space.
## Create a VM from an existing image on Proxmox
If you already have a cloud image on Proxmox, you can use it to create a VM:
{{ codefile "terraform" "examples/guides/cloud-image/debian-from-storage/main.tf" }}