| madduck | Hello, 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 |
|---|---|---|
| madduck | Also, 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 |
| madduck | Turns out the provider uses cloudinit to provision the VM. Can I somehow hook into that? | 12:13 |
| ananke | madduck: regarding your first question: yes, all of that's possible. same thing for the second question | 12:16 |
| ananke | typically a cloud provider will give you ability to customize/provide your own cloud-init userdata configuration that's passed to the VM | 12:17 |
| madduck | not this one. they are not a cloud provider. | 12:18 |
| madduck | they 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 that | 12:19 |
| ananke | what's the hypervisor they use? | 12:20 |
| madduck | ananke: Qemu (Proxmox) | 12:21 |
| madduck | They provision on our hardware. Hence I have access at this level | 12:22 |
| ananke | proxmox supports cloud-init, and allows to pass configuration | 12:22 |
| ananke | https://pve.proxmox.com/wiki/Cloud-Init_Support | 12:22 |
| ananke | of 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 vm | 12:24 |
| madduck | I tried this before and after starting the vm: | 12:24 |
| madduck | root@pve:~# qm set 999 --ipconfig0 ip=192.168.231.229/29,gw=192.168.231.225 | 12:24 |
| madduck | update VM 999: -ipconfig0 ip=192.168.231.229/29,gw=192.168.231.225 | 12:24 |
| madduck | the vm even contains /etc/netplan/50-cloud-init.yaml | 12:24 |
| madduck | but nothing is changed | 12:24 |
| ananke | check what's in /var/lib/cloud/instance | 12:25 |
| ananke | I'm also not familiar with how qemu works, but I don't think those config options are related to cloud-init | 12:28 |
| madduck | ananke: network-config.json in there has the old IP | 13:29 |
| madduck | I 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!