[SOLVED] Bookworm cloud image fails to find network adpater?

PeterAndersson

New Member
Dec 13, 2021
21
5
3
Hi I'm trying to use Proxmox with the debian bookworm cloud image and cloud-init.

But when I start the vm it gets stuck on boot when it checks that it has a network connection Job systemd-networkd-wait-online.service/start running (#s / no limit) for about 2 minutes.

It seems Debian bookworm is having issues using the network adapter from Proxmox?

After about 2 minutes it just gives up and boots into the OS but the network does not work?

Example running
Code:
sudo apt update

Fails with Failed to fetch mirror+file:...

The vm is created using the following commands:

Bash:
echo "Creating vm"
qm create "$VMID" --name "bookworm-test" --memory 10240 --sockets 1 --core 4 --net0 virtio="46:4A:5E:3C:8A:49",bridge=vmbr0 --description "Debian bookworm cloud image" --agent enabled=1 --onboot 1 --ostype l26


echo "Adding cloud-init device"
qm set "$VMID" --ide2 "$STORAGE:cloudinit"


echo "Add vga serial"
qm set "$VMID" --serial0 socket --vga serial0


echo "Importing OS disk"
qm importdisk "$VMID" "/tmp/$IMAGE" "$STORAGE"


echo "Adding OS disk to vm"
qm set "$VMID" --scsihw virtio-scsi-pci --scsi0 "$STORAGE:vm-$VMID-disk-0,backup=0"


echo "Resizing OS disk"
qm resize "$VMID" scsi0 +5G


echo "Set cloud init config"
qm set "$VMID" --cicustom "user=snippets:snippets/$VMID-$SNIPPETNAME"


echo "Set boot disk"
qm set "$VMID" --boot c --bootdisk scsi0

And the cloud init file contains the following:

YAML:
#cloud-config
hostname: bookworm-test
manage_etc_hosts: true
timezone: Europe/Stockholm

ssh:
  install-server: true
  disable_root: true
  ssh_quiet_keygen: true
  allow_public_ssh_keys: true


users:
  - name: peter
    gecos: Peter Andersson
    groups: users, docker, sudo, adm
    lock_passwd: false
    passwd: ....
    sudo: ALL=(ALL) NOPASSWD:ALL
    shell: /bin/bash
    ssh_authorized_keys:
      - ssh-ed25519 ... some@domain.org
      - ssh-ed25519 ... JuiceSSH


If I run
ip link show
it only displays the loopback(lo) and broadcast/multicast(ens18) device

If I run sudo lspci it displays the 00:12.0 Ethernet controller: Red Hat, Inc. Virtio network device device, I'm at a loss what is wrong? (The same setup works correctly on Debian Bullseye.

Is the VirtIO (paravirtualized) no longer supported?

I'm somewhat at a loss here as most debugging steps I find online require me to install more packages and that's more or less impossible without a network connection.
 
Last edited:
Looks like bookworm reads the network settings from the cloud-init while bullseye didn't.

Running `qm set "$VMID" --ipconfig0 ip=dhcp` fixed the issue!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!