FOSSBilling / Proxmox

Proxmox VM provisioning for FOSSBilling
GNU General Public License v3.0
35 stars 5 forks source link

[Feature Request] Template based new VM #4

Open tobsowo opened 2 years ago

tobsowo commented 2 years ago

Ability for a user to have a ready made installed and configured VM with an automated email for login URL with server info and login credentials.

An example use case installing Mautic on a new server from template without the need for any human interaction.

notbasetwo commented 2 years ago

This should really be broken down in to multiple problems, this is quite a big goal as automated deployment in this way isn't really baked in to Proxmox.

In reality, you would need cloudinit support to be configured inside the module (not too hard) and if you wanted this automated in the "give it an IP and stuff" - an IPAM system.

tobsowo commented 2 years ago

This should really be broken down in to multiple problems, this is quite a big goal as automated deployment in this way isn't really baked in to Proxmox.

In reality, you would need cloudinit support to be configured inside the module (not too hard) and if you wanted this automated in the "give it an IP and stuff" - an IPAM system.

I'm not really technically sound in this just believe it's something that's achievable. Maybe you can share more details about how this can be done.

Thank you.

tobsowo commented 2 years ago

Just reading up on cloud-init and found this. https://pve.proxmox.com/wiki/Cloud-Init_Support

This is interesting to know.

notbasetwo commented 2 years ago

Just reading up on cloud-init and found this. https://pve.proxmox.com/wiki/Cloud-Init_Support

This is interesting to know.

Yes, this is very possible. cloud-init is super powerful and with the right configuration, can also even be made to work with Microsoft Windows.

This just requires being implemented in to the module prior to templates working. There are a few steps before it can become a reality.

IP-address management (IPAM) is also not present and is needed to provide traditional VPS-style networking where everyone gets an IP assigned to them & what not. This has security implications too (e.g. ensuring that firewalling is configured correctly so that users can't just go and use any 'ol network address).

notbasetwo commented 1 year ago

Going on from this, this is possible in Proxmox by doing the following (depending on virtualisation type):

LXC Container:

QEMU VM:

"Re-installing" for both is not really a mechanic in Proxmox, the easiest way to do this is just delete & re-create the VM using above process.

The QEMU process may seem overly drawn out & long winded - but this is essentially what the PVE is doing for you in LXC containers. Proxmox provides little to no native ways to do this cleanly. QEMU throws additional issues due to the added complexities in VM templates. #13

I have a mockup locally for how this could work (very dirty and quick script) using the PVE2 library if anyone wants to see it (if they are interested in implementing this).

tobsowo commented 1 year ago

I have a mockup locally for how this could work (very dirty and quick script) using the PVE2 library if anyone wants to see it (if they are interested in implementing this).

I would want to try this out.