/srv/irclogs.ubuntu.com/2025/07/01/#cloud-init.txt

madduckHello, quick question, since the website left me a bit confused. There it says cloud-init configures locale, hostname, ssh keys and ephemeral mount points. I need to also (1) install a systemd service, (2) change networking parameters, and set the root password. Is that also possible?09:35
madduckAlso, can I use cloud-init to modify a clone of a VM that is not itself a cloud VM? We have an Odoo instance externally managed, and I'd like to be able to create a testing clone, which then is slightly modified. Can I use cloud-init for that?09:37
madduckTurns out the provider uses cloudinit to provision the VM. Can I somehow hook into that?12:13
anankemadduck: regarding your first question: yes, all of that's possible. same thing for the second question12:16
ananketypically a cloud provider will give you ability to customize/provide your own cloud-init userdata configuration that's passed to the VM12:17
madducknot this one. they are not a cloud provider.12:18
madduckthey provide us a VM they provisioned and managed. But we want/need to create a clone for testing purposes. I have it all working with Proxmox to the point where I currently mount the volume manually to change things like IP address before starting the VM. I'd like to automate that12:19
anankewhat's the hypervisor they use?12:20
madduckananke: Qemu (Proxmox)12:21
madduckThey provision on our hardware. Hence I have access at this level12:22
anankeproxmox supports cloud-init, and allows to pass configuration12:22
anankehttps://pve.proxmox.com/wiki/Cloud-Init_Support12:22
anankeof course a lot depends on whether you need to be able to pass in information to the vm on creation, or whether it's just something you statically define, in which case things like 'setting root password' via automation makes little sense if said configuration is stored on the vm12:24
madduckI tried this before and after starting the vm:12:24
madduckroot@pve:~# qm set 999 --ipconfig0 ip=192.168.231.229/29,gw=192.168.231.22512:24
madduckupdate VM 999: -ipconfig0 ip=192.168.231.229/29,gw=192.168.231.22512:24
madduckthe vm even contains /etc/netplan/50-cloud-init.yaml12:24
madduckbut nothing is changed12:24
anankecheck what's in /var/lib/cloud/instance 12:25
anankeI'm also not familiar with how qemu works, but I don't think those config options are related to cloud-init12:28
madduckananke: network-config.json in there has the old IP13:29
madduckI think the problem might be that cloud-init has already run, no?13:30
=== kuraudo1 is now known as kuraudo

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!