ORIGINAL REDDIT POST

Automatic VM Deployment

Hello, I want to design an infrastructure with two physical server hosts on which I want to deploy a LINUX VM and a WINDOWS VM per person. In all, there will be 10 people who will use server A and 10 others will use server B. Is there a method where we can…

Original postr/sysadmin

Hello, I want to design an infrastructure with two physical server hosts on which I want to deploy a LINUX VM and a WINDOWS VM per person. In all, there will be 10 people who will use server A and 10 others will use server B. Is there a method where we can launch an automatic deployment with configuration of each vm for each user for example user 1, ip of the vm, host name etc.. and so on for each Windows and Linux vm. I hesitate between proxmox and hyperV as a virtualizer in this need. Thanks to you

Collected discussion

16 comments

u/Expensive-Rhubarb267

It depends on how much automation you need. If you just need x20 VM overall then you'll probably sink more time into getting an automation pipeline than just doing them manually. If you need automatic deployment - use Terraform to build the VMs & Ansible for the Linux VMs & Group Policy for the Windows ones If you need full 'on-demand' machines with specific apps. You're probably better off looking at a VDI solution

u/Cultural_Log6672OP

It is for 40Vm , 20 Windows and 20 Linux

u/Cultural_Log6672OP

I have never used proxmox, only hyperV. And I have never used ansible or any other tool of this kind.

u/Cultural_Log6672OP

And does it work for the automated deployment of WINDOWS SERVER VMs with automatic fixed IP configuration and so on?

u/Candid_Candle_905

Yes HyperV can do it, however Proxmox in my experience would be easier to automate at this scale. Also another plus for Proxmox is that Linux cloud images and clone based provisioning are straight forward, while Windows can be templated and customized with Sysprep or cloud-init style workflows or post deploy scripts.

u/Expensive-Rhubarb267

If it's just 40 VMs & that isn't liable to change, then I'd just be tempted to build them manually. Just do it via PowerShell (if it's Hyper-V). Make sure you've got an AD domain & Group policy set up first. Or Ansible if it's Proxmox. Create a virtual machine in Hyper-V | Microsoft Learn Provision VM from template using ansible. | Proxmox Support Forum Terraform for hyper-V/Proxmox is also a good option. hyperv_machine_instance | Resources | tidalf/hyperv | Terraform | Terraform Registry But if you're completely new to Infrastructure as Code, it might take you longer to get set up with Terraform than just to build them individually.

u/Candid_Candle_905

Yes, that's the whole point of IaC here: one golden Windows Server template, then Per-VM config for teh hostname, static IP, DNS, domain join, etc via Terraform/Ansible /PowerCLI. You don’t want to click 40 times

u/Candid_Candle_905

Proxmox + cloud-init + Terraform/Ansible

u/anonymousITCoward

you'll probably sink more time into getting an automation pipeline than just doing them manually. ahhhh whats that old saying? "Why spend 5 minutes doing it when I can spend 5 days automating it" lol

u/Suaveman01

Bro trying to make his own vdi platform

u/MeetJoan

Both work for this. Proxmox + cloud-init is the easier path for automating per-VM config (hostname, IP, users) via script or Ansible - have you used either platform before?

u/cyr0nk0r

What hypervisor platform are you using? Are you doing this on prem or in the cloud? These answers will dictate quite a bit on the answers.

u/thedbp

Proxmox templates, I use them a lot at my work. Take literally 2 minutes to spin a new server up from template.

u/Adam_Kearn

It depends a lot of your environment. If it’s hyper-v based you can put a powershell script together to create the VMs and VHDX files. I would then look into unattend.xml files as this can be used to automate the install of windows. Most decent distros also have a Linux version of this. You can then deploy a VM within 20-30mins. Have a script that runs after OS install (within the unattend.xml) to setup any post image customisations needed.

u/Burgergold

Look at Azure Virtual Desktop