canonical / lxd

Powerful system container and virtual machine manager
https://canonical.com/lxd
GNU Affero General Public License v3.0
4.32k stars 926 forks source link

Disabling cloud init network configuration works sometimes #11238

Closed Jorgen-P closed 1 year ago

Jorgen-P commented 1 year ago

Required information

Issue description

Attempting to disable cloud init network configuration for virtual machines attached to a network bridge. Configuration only works for some of the VMs (seems to be random, or possibly it works ok for the first one after not trying for a little while?). Thought it was weird so updated from LXD 5.8 to 5.9 and rebooted, still managed to reproduce the issue after creating a few VMs.

Steps to reproduce

  1. Set up a basic network bridge using Netplan on host with static IP
  2. Configure a profile to use said bridge (used some lxc network profile-attach/detach and editing the profile because I got it wrong at first)
  3. Run lxc launch images:ubuntu/22.04/cloud test1 --vm < test.yaml to create first VM
  4. Check /etc/netplan or assigned IP in lxc list for VM
  5. Repeat VM creation and IP address checking until both behaviors show up (took me 3 VMs this time)

Where test.yaml contains:

config:
         cloud-init.network-config: |
                config: disabled

Information to attach

The monitoring is of creating 1 VM

dmesg.txt monitor.txt config_working.txt config_non_working.txt log_working.txt log_non_working.txt lxd.log

stgraber commented 1 year ago

Can you get the cloud-init logs for both working and non-working?

tomponline commented 1 year ago

@Jorgen-P are you still experiencing this issue on LXD 5.14?

tomponline commented 1 year ago

Hi @Jorgen-P I'll close this for now, but if you can get the logs asked for and confirm whether its still an issue on a supported version of LXD we can reopen. Thanks