How to create VM golden or cloud image template in Proxmox

Feb 19, 2022
18
0
6
43
I have searched youtube for videos on creatin g VM templates in proxmox and to my surprise they are all junks. To be expected especially all these homelabbers that are just trying stuffs out. Even a middle schooler can start youtube channel as homelabber nowadays making videos like a go to expert.

Funny thing about homelabber youtubers is that one person create a junk and the thing spreads like the plague. Anyways enough of the rant and back to solution.

A template should allow you to create (not clone) a VM and allow you to modify memory, cpu, disk size and many more and even can come with pre-installed tools and packages just like an AMI in AWS.

in AWS we create an EC2 from an AMI, not clone an EC2 from an AMI

Anyone here have link to any guide of how to "properly" create a cloud template for ubuntu on proxmox?

If not will have to spend more time to create mine. I have done this on Xenserver/XCP-ng and looking for something similar and hopefully easier with proxmox
 
Last edited:
this might have been one of reasons why i went with xenserver/XCP-ng in the past
am not sure when proxmox will understand what a template should be
a template should work like an AMI works

you create an EC2 from an AMI
You dont clone an EC2 from an AMI


just not sure if that is rocket science to get right
might have to try to work this out if possible else might stick to XCP-ng again

great features with proxmox but seems the cloud-like experience with templates and creating a VM from it like one does AWS is too complicated for proxmox to implement
 
Clouds are one type of things, and hypervisors are other types of things.

Clouds are on an upper abstraction layer, that uses hypervisors on the back, together with a lot of other softwares to do the things their own way, "their magic". An Hypervisor, like Proxmox, just run VMs. If you need more abstraction to don't have to do things manually, you are looking for the wrong solution.

Proxmox is just a Linux installation, with KVM and LXC enabled, and a Web UI to manage all the things. They extra software is focused on running VMs and LXC containers, and tasks related to the VMs and LXC containers (backups, clustering, etc). Even you can install Debian, and on top of it install Proxmox tools, and the result would be the same. Proxmox is not a Cloud Platform, just like Microsoft Hyper-V is not a Cloud Platform, and as VMware vSphere is also not a Cloud Platform. Proxmox team does not have to "understand" anything, because you are expecting a Cloud Platform feature from an Hypervisor. Clone make an exact copy. And templates are made to be cloned. It's also consistent with all other hypervisors that implements cloning the same way.

If you want a Cloud Platform try Cloud Stack or OpenStack (this one tries to work like AWS the most), and you will see all the things you need to implement and configure to have a platform with a behavior similar to AWS or Azure. You will see that you need to install Hypervisors like vSphere or KVM (on another distro, Proxmox nodes are not compatible), and also lot of services to do the extra "cloud stuff".

Also, you can use other tools to create VMs in an automated way. For example, if you use Ansible, you can use the module "community.general.proxmox_kvm" to create VMs from a template, and specify the hardware resources that you would like to have. Something like this:


YAML:
- name: Create VM
    community.general.proxmox_kvm:
      api_user: "{{ proxmoxUser }}"
      api_password: "{{ proxmoxPassword }}"
      api_host: "{{ proxmoxUrl }}"
      node: "{{ proxmoxNode }}"
      name: "VM-Name"
      clone: "TemplateName"
      proxmox_default_behavior: "no_defaults"
      full: yes
      onboot: yes
      description: "VM Created with Ansible"

I tried using Terraform, but sucked. There is no official provider supported. Also tried to make a provider but was not that practical and limited.

I finally you can make a tool for that, using Proxmox API calls. If you don't pay for Proxmox, just be thankful that it's free. And if you are paying, you are paying for what they offer, not for what you would like them to offer.

I'm in the process of doing something similar, like a dashboard to only see VMs and Containers and make cloning easier, as that's the only thing I use from Proxmox on my Homelab. I use Kubernetes, so my deployments are implemented that way, my backups runs from my NAS where I have all the virtual disks, and the monitoring is done with Prometheus on my Raspberry Pi. Change your mindset, don't be childish demanding and rude, and you will be happier.
 
Last edited:
@Master of the Wind
did you read my comment? i said like XCP-ng
XCP-ng/xenserver allow you to create VM from template aka base image and allow to modify the CPU, memory, disk size and many more
cloudinit to also manage all other stuffs

it is not a clone, that is what am talking about

am not saying we need replace AWS, just basic feature of creating VMs from base images

Proxmox seems not to be able to do that, and if am wrong please show me who has been able to do the above i mentioned
 
XCP-ng/xenserver allow you to create VM from template aka base image and allow to modify the CPU, memory, disk size and many more
cloudinit to also manage all other stuffs

it is not a clone, that is what am talking about
I think what you are saying is that you'd like a GUI wizard that lets you do it all in one window. Admittedly, I am not familiar with details of how XCP-ng does it. There is a good chance they combine multiple steps/API into single wizard for ease-of-use.

If such functionality is a requirement for you, and since it does not exist today, you can file an enhancement request here: bugzilla.proxmox.com
Make sure to articulate your requirements well.

Another option is for you to submit code/patches to improve the product, or build an external GUI that hides the complexity.

Best,


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!