Perfect Proxmox Template with Cloud Image and Cloud Init

preview_player
Показать описание
Using Cloud Images and Cloud Init with Proxmox is easy, fast, efficient, and fun! Cloud Images are small images that are certified cloud ready that have Cloud Init preinstalled and ready to accept a Cloud Config. Cloud Images and Cloud Init also work with Proxmox and if you combine the two you have a perfect, small, efficient, optimized clone template to provision machines with your ssh keys and network settings. So join me as we discuss, set up, and configure Proxmox with Cloud Images and Cloud Init.

(Affiliate links may be included in this description. I may receive a small commission at no cost to you.)

00:00 - What is Cloud Init?
01:07 - Configure Cloud Image
04:09 - Configure Cloud Init
06:40 - Create a Template
08:07 - Cloning a Machine
09:47 - SSH Intro cloned machine
09:59 - Troubleshooting
10:37 - What do I think about Cloud Images & Cloud Init
11:25 - Stream Highlight - "from 0 to Kubernetes in 3.6 minutes"

#Proxmox #HomeLab #Cloud

"Head Space" is from Harris Heller's album "Gold"

Thank you for watching!
Рекомендации по теме
Комментарии
Автор

I haven't the foggiest idea if I mist anything, so let me know if I did ☁

TechnoTim
Автор

Okay, now I can officially begin my Saturday

RaidOwl
Автор

Not sure whether this is related to Proxmox version (8), but this doesn't work for me when I create a template without password (SSH Key only). It always gives me publickey persmission denied, even though I do have everything configured correctly (been doing this in public clouds for a while now). So I imagine there might be more tweaking to do with a custom cloud init yaml file.

caioac
Автор

Great video Tim!

I would generally suggest to use the 'releases' builds as you get the latest LTS build inside there (22.04), instead of choosing the daily builds like in the video.

Also please note that these images do not contain the same packages as the standard server, since some features are not relevant in the Cloud, like printer drivers and such. There is a manifest file next to the img where you can see the packages installed. I would suggest booting the image and making sure everything you need is there before setting it up as template.

Note that some of the images don't use the 'linux-generic' kernel which can cause issues down the line when trying to isntall packages such as 'nfs-server' for example.

And lastly, the VMs created by the template have a disk the same size as the image by default, which is probably not desired in most cases. However, these cloud images are usually designed to auto expand the disk upon boot, so with Proxmox you should be able to use the "Resize disk" button in the Hardware section to set the desired size.

hXr
Автор

Just used these today actually! Messing around with setting up my environment using Ansible, and cloud-init is great for this as well.

mikkel
Автор

You had to say something... Getting error qm set 8000 --scsihw virtio-scsi-pci --scsi0 NAS_NAME:vm-8000-disk-0 and its the right # ... 😑

fmslickful
Автор

Hey Tim, great video 👍 Before creating the template, I would recommend adding in the qemu-guest-agent to the cloud image with the following command: virt-customize -a {{IMG}} --run-command 'apt-get update && apt-get upgrade -y && apt-get install qemu-guest-agent -y'

AnthonyMcAtamney
Автор

Your videos are legit really good. There can literally never be too much home lab content and yours is super palitable and informative.

GabrielFoote
Автор

Another Great Video!!! 👏 I have found this way is a lot easier than using Packer to create my templates. I did run into a few snags. When creating the VM from the command line, I see that the SCSI Controller is set to the Default (LSI 53C895A) and when you import the disk image it is added as an Unused Hard Disk 0. So when you run the next command to add the disk to the vm it fails. All that is needed is to change the controller to VirtIO SCSI and then change the Unused Hard Disk 0 setting to make it a SCSI disk and then everything is fine. 😀 Now on to learn Ansible.👍

scockman
Автор

I was making a 5 node k3s cluster and got so sick of installing Ubuntu 😂😅😂
Decided there had to be a better way. I wonder if vagrant can work with proxmox...

dominick
Автор

This is perfect. I also adjust the disk to my needs per VM. Besides installing qemu-guest-agent as one of the pkgs in my Ansible script I added the cloud-initramfs-growroot pkg, so when I do make the disk larger I just reboot the VM to get the file system expanded.

enderst
Автор

Very nice work but I have issue when I try ssh say public key error

skylanbisgard
Автор

Damn, I literally setup my cloudinit images 4 days ago. It's simple, but I'd prefer if I had this video for that.

aljaxus
Автор

Cool! I'm doing the same, but without UI, just bash script to batch configure it with correct VLAN and IP. Of course would be simpler to do it with ansible pointed to the proxmox host

vanopiano
Автор

Great stuff Tim. This is exactly what I wanted to set up at my studio/homelab!

kimotroph
Автор

Sorry how do we change the drive size?

danielyavdoshchin
Автор

To provision a Kubernetes cluster in my Proxmox homelab, it was long and tedious.

Before:

- I had to create the virtual machines manually from an ISO,
- Then I accelerated the process with Cloud-Init images,
- But i had to install the packages manually,
- Same for the configurations
- I make sure to make snapshots of my initial configuration,
- If the configuration fails, i delete my machines and we start again...

Duration : 15-30 minutes and more....

Now : a Terraform declarative file is enough to get my kubernetes cluster with the desired configuration,

Duration : 3 to 5 minutes maximum and a simple "terraform apply" is enough to destroy and rebuild my cluster,

sussudio
Автор

This is a great video tutorial on how to create a Proxmox template with Cloud Image and Cloud Init. I found it very helpful and informative. The presenter is very clear and concise in his explanations, and he does a great job of walking through the steps involved. I would definitely recommend this video to anyone who is interested in learning more about Proxmox

fuzzlabrador
Автор

Recent proxmox actually have a download-from-link feature in the UI where you would normally upload the iso, which is a very practical addition.

Would you consider making a video on doing this entire setup via Terraform? I've been playing with it via the API, and it seems like an elegant way to setup K8s clusters.

TweakMDS
Автор

This is what I do but using terraform or/and ansible depending my needs.
Easy to do, fast and you can optimize / customize the cloud init to fit your needs.

ganon