[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to avoid 1 minute timeout of 'Raise network interfaces'?



Hello,

thanks for providing cloud images!  I'm migrating towards them for VM
installs instead of preseeding and the debian installer.

I'm using bullseye genericcloud images with libvirt on a buster host.  I
want a completely static network configuration.  The following commands
works, and the VM comes up with static network, but there is a
one-minute delay during first boot.  What is happening?  I'm guessing it
is doing a DHCP request that times out.

Is this a bug that should be reported and fixed, or is this intentional
behaviour?

How do I avoid the timeout?

For comparison, Ubuntu cloud images does not behave like this, they boot
quickly and acquire a static network config as expected.

I have tried dsmode=local too ('cloud-localds -m local'), but it didn't
make a difference.

See at the end for content of the input files, if someone wants to
experiment with reproducing this.

cloud-localds -v --network-config=network_config_static.cfg /var/lib/libvirt/images/seed-sid.iso cloud_init.cfg
wget -O /var/lib/libvirt/images/sid.qcow2 https://cloud.debian.org/images/cloud/bullseye/daily/20210528-651/debian-11-genericcloud-amd64-daily-20210528-651.qcow2
virt-install --name sid --import --os-variant debian10 --memory 1024 --vcpu 1 --disk /var/lib/libvirt/images/sid.qcow2 --disk /var/lib/libvirt/images/seed-sid.iso,readonly=on --noreboot --autostart --noautoconsole
virsh start --console sid

...
[    3.843084] cloud-init[361]: Cloud-init v. 20.4.1 running 'init-local' at Sat, 29 May 2021 18:33:10 +0000. Up 3.82 seconds.
[  OK  ] Finished Initial cloud-init job (pre-networking).
[  OK  ] Reached target Network (Pre).
[  OK  ] Started ifup for enp1s0.
         Starting Raise network interfaces...
[    4.233341] pcieport 0000:00:02.7: pciehp: Slot(0-7): No device found
[**    ] A start job is running for Raise network interfaces (19s / 5min 1s)
[  OK  ] Finished Raise network interfaces.
[  OK  ] Reached target Network.
         Starting Initial cloud-ini… (metadata service crawler)...
[   67.626612] cloud-init[616]: Cloud-init v. 20.4.1 running 'init' at Sat, 29 May 2021 19:01:25 +0000. Up 67.60 seconds.
[   67.644647] cloud-init[616]: ci-info: +++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++
[   67.647251] cloud-init[616]: ci-info: +--------+------+----------------------------+-----------------+--------+-------------------+
[   67.652810] cloud-init[616]: ci-info: | Device |  Up  |          Address           |       Mask      | Scope  |     Hw-Address    |
[   67.660669] cloud-init[616]: ci-info: +--------+------+----------------------------+-----------------+--------+-------------------+
[   67.663239] cloud-init[616]: ci-info: | enp1s0 | True |      178.174.241.111       | 255.255.255.192 | global | 52:54:00:d2:c6:85 |
[   67.668836] cloud-init[616]: ci-info: | enp1s0 | True |   2001:9b1:8633::111/48    |        .        | global | 52:54:00:d2:c6:85 |
...

/Simon

cloud_init.cfg:

#cloud-config
fqdn: sid.sjd.se
manage_etc_hosts: true
disable_root: false
ssh_pwauth: false
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILzCFcHHrKzVSPDDarZPYqn89H5TPaxwcORgRg+4DagE cardno:FFFE67252015

network_config_static.cfg:

version: 2
ethernets:
  enp1s0:
    dhcp4: false
    addresses: [ 178.174.241.111/26, 2001:9b1:8633::111/48 ]
    gateway4: 178.174.241.65
    gateway6: 2001:9b1:8633::1
    nameservers:
      addresses: [ 213.80.98.2, 2001:9b0::53:1, 213.80.101.3, 2001:9b0::53:2 ]

Attachment: signature.asc
Description: PGP signature


Reply to: