Hi,
I have a VM set up with cloud-init according to the instructions at https://pve.proxmox.com/wiki/Cloud-Init_Support using the Ubuntu Focal cloud image. This all worked flawlessly the first time I did it (thanks!). However, later I wanted to change the network configuration without recreating the VM. I ran
with the new configuration. The first to update cloud-init, and the second to update kvm. However, when the VM boots, the netplan configuration file doesn't get updated, and as far as I can tell, cloud-init isn't "fully" run. So the VM was still trying to use the old config internally. What seemed to work was to run
The documentation doesn't mention whether it's supposed to be possible to rerun cloud-init when the config changes; I guessed that it's supposed to just work, and I can't find other people running into this problem! My VM config is
Could the use of ovmf (needed for GPU PCI passthrough) be responsible (I changed this after originally creating the VM)?
I realised later that the gateway I was setting was wrong - could it be refusing to apply the new networking because the config was wrong? There didn't seem to be anything useful in the logs.
I have a VM set up with cloud-init according to the instructions at https://pve.proxmox.com/wiki/Cloud-Init_Support using the Ubuntu Focal cloud image. This all worked flawlessly the first time I did it (thanks!). However, later I wanted to change the network configuration without recreating the VM. I ran
Code:
qm set 100 --ipconfig0 ...
qm set 100 --net0 ...
with the new configuration. The first to update cloud-init, and the second to update kvm. However, when the VM boots, the netplan configuration file doesn't get updated, and as far as I can tell, cloud-init isn't "fully" run. So the VM was still trying to use the old config internally. What seemed to work was to run
cloud-init clean
and cloud-init init
, then reboot (twice?), and this caused the new cloud-init config to "take".The documentation doesn't mention whether it's supposed to be possible to rerun cloud-init when the config changes; I guessed that it's supposed to just work, and I can't find other people running into this problem! My VM config is
Code:
root@ainosticssrv02:~# qm config 100
agent: 1
bios: ovmf
boot: c
bootdisk: scsi0
cipassword: **********
cores: 16
efidisk0: local-lvm:vm-100-disk-1,size=4M
hostpci0: 81:00.0,x-vga=on
ide2: local-lvm:vm-100-cloudinit,media=cdrom
ipconfig0: ip=192.168.140.100/24,gw=192.168.140.1
memory: 131072
name: sandbox
net0: virtio=46:07:A1:74:69:EC,bridge=vmbr1
numa: 0
onboot: 1
scsi0: local-lvm:vm-100-disk-0,size=53452M
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=e3b0a5a4-a1a3-44fc-8766-2e250bdc4a4a
sockets: 1
sshkeys: <redacted>
vga: qxl
vmgenid: b73354d9-cb3f-4eb5-a8ab-35bff966644b
Could the use of ovmf (needed for GPU PCI passthrough) be responsible (I changed this after originally creating the VM)?
I realised later that the gateway I was setting was wrong - could it be refusing to apply the new networking because the config was wrong? There didn't seem to be anything useful in the logs.