Creating library of Windows KVM templates - hostnames, MAC addresses and SIDs?

victorhooi

Well-Known Member
Apr 3, 2018
253
20
58
38
Hi,

We are setting up a test lab of Windows machines using Proxmox/KVM.

The plan is to create some Windows templates using Proxmox/KVM templates. We'll have multiple variants of each Windows version - e.g. 3-4 variants of each of Windows 7, Windows 8.1 and Windows 10.

So I've create a new KVM VM, and I've installed Windows in it.

I can then right-click, and convert it to a template. I can then spin up X number of VMs based on this template.

Firstly - what about things like MAC addresses, hostnames, SIDs? Will these automatically change with each invocation of the template? Or do I need to change them myself? (e.g. using sysprep).

Secondly - being able to randomly generate hostnames would be nice - because then we could install something like collectd or telegraf on the VM template, and have it automatically send data to InfluxDB, and have it key-ed on the hostname.

Thirdly - Is it possible to spin up a VM from a template, customise it some more, then create a new template based on that?

Thanks,
Victor
 
Firstly - what about things like MAC addresses, hostnames, SIDs? Will these automatically change with each invocation of the template? Or do I need to change them myself? (e.g. using sysprep).
mac addresses and smbios uuid gets newly generated when you clone a template, the hostname is something you have to set inside the vm (which could be worked around using cloud-init, though i did not get it to work reliably on windows), ip adresses etc. has to be configured inside the vm (of course this could be done via dhcp/mac etc.)

Thirdly - Is it possible to spin up a VM from a template, customise it some more, then create a new template based on that?
sure
 
Wow, that's pretty cool that the templates will take care of MAC address and smbios uuid.

Is smbios uuid the same as the machine's SID?

Is this all documented somewhere? If not, it seems like something that could be added to https://pve.proxmox.com/wiki/VM_Templates_and_Clones. If you provide me the references, I can add it?

Regarding hostnames - yeah, maybe we can generate those automatically (either by random, or based on MAC address).
 
Is smbios uuid the same as the machine's SID?
as i understand it, windows sids for machines get set on install, so no this is not the same

i do not have many windows vms in production, but i would sysprep them anyway before converting in a template/before cloning
this way the sid will be regenerated (afair)

Is this all documented somewhere?
it is documented here: https://pve.proxmox.com/wiki/Qemu/KVM_Virtual_Machines#qm_copy_and_clone
but yes, someone could improve that wiki article (if you want a wiki account, just send a request to office@proxmox.com)
 

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!