0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-08-27 05:45:38 +00:00
terraform-provider-proxmox/templates/guides/cloud-image.md.tmpl
Pavel Boldyrev c39494b939
feat(docs): rename howtos -> guides and publish to the Terraform Registry (#971)
feat(docs): rename howtos -> guides and publish on the registry page

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-01-27 16:45:56 -05:00

31 lines
1.6 KiB
Cheetah

---
layout: page
title: Create a VM from a Cloud Image
parent: Guides
subcategory: Virtual Environment
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 exiting 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" }}