Proxmox VM Template Cloning with Terraform and OpenTofu

preview_player
Показать описание
Proxmox VM Template Cloning with Terraform and OpenTofu

The video is part of a Proxmox PVE Nested Virtualization home lab series, where we will be building out a lab environment to test Proxmox no subscription features and functionality.

Since Broadcom's acquisition of VMware, many customers are looking elsewhere for their virtualisation requirements. This video shows how to use Terraform and OpenTofu interchangeably to clone VM templates, and some of the snags found along the way.

In this video, we run through:
Some of the information sources for Terraform and OpenTofu.
Specifying providers.
Some of the snags with different providers and how to change them.
Simple Terraform details for a VM template cloning (for multiple machines).
Difficulties with IP address re-use by DHCP.
How to update the machine-id on the source template to fix the DHCP problem.

Рекомендации по теме
Комментарии
Автор

One thing you can do if you are using cloud-init is to run the command "cloud-init clean --machine-id" This will take care of the duplicate IP address in the VM, since the DHCP server is using the machine-id. Another option is to setup the DHCP server to use the MAC address only and not the machine-id for determining what IP address to give out.

johnvillalovos
Автор

thank you so much for making these video

RaoShahzaib
Автор

Can you do more than 1 resource per .tf file? Wanting to use this to set up server + 2 worker nodes for Kubernetes practice.

JeffreyJohnsonC
Автор

terraform seems so finicky. Do you like opentofu or terraform better? I’ve been trying to get the OS to not start adter creation and so far, its just like banging my head on a wall.

ipstacks
Автор

did you test the duplicate IP thing with a regular VM as well. I could be wrong, but I think you ran the test, it failed, then you converted the VM you were using to a template, then ran the test with your changes. Maybe a template changes the machine ID when it gets cloned?

ipstacks
join shbcf.ru