KVM templates and default root password

amil

Active Member
Dec 16, 2015
63
0
26
Spain
Hello,

With "Convert to template" feature in proxmox really is very easy to create a predefined KVM template, but of course the new vms created based on this template have the same root password that predefined template that is not the best in some cases.

I use WHMCS (and modulesgarden proxmox module) but the main idea is how can i change -or force to change- to a user defined -and unique- root password (given by user)?

In OpenVZ templates this works very nice, we can set a defined password without issues, but KVM works different. It´s a very bad idea provide the same "password" to multiple vms managed by different people, so it will be nice know opinions about how to solve this.


Greetings!
 
There is no way to change root password via the Proxmox VE tools.

You need to modify/create your VM templates in a way that they create unique keys and unique passwords on first boot.
 
We use this templatefeature only for WindowsVMs. This makes sense with the sysprep option. But in Windows we have always to VMs. One VM to Update the template and change something. Then clone the machine again and to an sysprep.

With linux to no use the templatefeature. The template protect the vm only for someone to start it an make an nice icon. In linux it is easy to use an vm, update it, change it, do what you want as template. And when you would like to use it as new vm, clone it. Set an default root or userpasswort. 123 or abc or ... We do this in this way. Easy.
 
There is no way to change root password via the Proxmox VE tools.

You need to modify/create your VM templates in a way that they create unique keys and unique passwords on first boot.
Yes, it would be nice a great idea, but the problem is, how we "fetch" this new generated keys to show user/customer in WHMCS, is no way.

dietmar:
You can also configure PAM to ask for a password on first login.
With this, it is nice if user when VM is created open the VNC console and try to login. In many cases, since VM is created and customer login (to force change password) it can take many time, so it having a default password and hoping customer login it at first time to change it, it is not an ideal situation.

fireon, thank you for your suggestions too! But in my opinion its a bad idea set a default password and "hope" customer login to change it -or at least not the best idea in productions environments or hosting companies-

It will be nice continue hearing people sharing experience about how to solve this, including people who uses WHMCS (and maybe modulesgarden proxmox) and take care of issue before :)

Thanks again to all, best regards!
 
Last edited:
I too am looking to solve this problem. That being said, I had the same problem with VMWare. The only platform I have used that has addressed this is OnApp. But they basically preinstall an SSH server in their templates (even on windows) so they can feed commands to it.
 
I too am looking to solve this problem. That being said, I had the same problem with VMWare. The only platform I have used that has addressed this is OnApp. But they basically preinstall an SSH server in their templates (even on windows) so they can feed commands to it.

It is supposed that in modulesgarden in the proxmoxvps module they solved it. But i have to try it.
 
@amil What is with LXC? Is this nothing for you? With LXC you can set password.... only with linux.
 

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!