Password cloned VM

bady

Renowned Member
Jul 28, 2014
11
1
68
Germany
Hello,

I am using openvz with proxmox and want to also use KVM now.
Is it possible to set/change the root password for a cloned vm over the api? As far as I've seen it, has a cloned VM the same password like the KVM Template.

Thanks!
 
A clone should have everything exactly like what it was cloned from.
Changing the password of a VM unfortunately is no easy task. There simply is no general solution there. Just consider that the VM could have a custom partition layout, maybe even encrypted disks, or use an unknown OS with an unknown filesystem.
So no, there's currently no way to directly change the contents of a VM from the GUI.
 
an idea would be create your clone setting auto login for the only user (root) with a mandatory script to reset its password to random and then email you that, and other access details (like the assigned dynamic ip)
(and other settings like ssh keys etc.).

we do something different but to give you an idea: we periodically clone a production vm with a script that uses the API and
- clones the vm to a new VMID (if existing, the old one is deleted))
- changes network bridge to put it offline
- starts the cloned vm (which runs offline)

then when accessing locally (web console) we run a bash script that
- verify that the vm is offline (ping) & other checks
if ok then
- changes clone vm hostname
- changes clone vm ip
- changes clone vm host file
- changes clone vm ssh keys
- removes some other config not useful for the cloned vm (or adds other bits)

you get the idea.

Marco
 
Last edited:
  • Like
Reactions: linkstat
Thanks for the replies. Pity that there is no way at the present time via API. I will have a look on a script solution.

@spirit
cloud-init looks interesting. But it should not ready for VE 4.0, right?
 
Hello,

I saw on the devel that Alexandre was working on a cloud-init integration on august/september 2015. Any news about a integration in Proxmox for that?
 
Hi spirit,

did you have time to work on cloud-init? If you need help with testing, let me know.
 
I'm still keeping a cloudinit branch on github (links below), but nothing in there is official, final or promised to be merged.
Suggestions, pull requests, etc. are welcome, but we don't know how much we want to support directly. Complex setups will have to be created manually. The most likely scenario is that we'll just stick to network/dns settings, probably ssh keys.
Not sure if the current pvetest repository is enough, might need latest pve-common from git, too.

(The branch is regularly rebased onto master, so expect force-pushes. Although if people start playing with it I might switch to merging...)

https://github.com/Blub/pve-qemu-server cloudinit
https://github.com/Blub/pve-manager cloudinit

(master branch mirrors git.proxmox.com)
 
Hi all,

I'm new here. We are evaluating Proxmox as an option but we are very interested in the Cloud-Init feature to offer rapid and automatic provisioning of VMs to our clients. Do you have any certainty about if Cloud-Init will be available for Proxmox 4.3 and if you have an estimated release date of the new version?
 
The mentioned branches should™ still be up to date and working. At least I kept rebasing, but haven't tested it in a while.
 
Ok, built the packages, installed on a test pve. I see the CloudInit stuff in web gui and can enter data there, which will be put into the vm config file (ipconfig0, sshkey,...). But i can't enable the whole thing. I already tried to find some information in the mailinglist, but found nothing helpful.

Is this already in the code?

Code:
cloudinit: mode=once

How do i enable CloudInit? And how can i supply the cloud images? I do not care about using the CLI ;)
 

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!