[solved] Initialization hangs when using preseed

I’m trying to initialize Incus with a preseed, however Incus hangs.

$ incus version
Client version: 6.0.3
Server version: 6.0.3
$ cat incus-preseed.yaml 
networks:
- config:
    ipv4.address: 10.0.100.1/24
    ipv4.nat: 'true'
  name: incusbr0
  type: bridge
profiles:
- devices:
    eth0:
      name: eth0
      network: incusbr0
      type: nic
    root:
      path: /
      pool: default
      size: 24GiB
      type: disk
  name: default
storage_pools:
- config:
    # btrfs:
    #   mount_options: subvol=@lxc
    # source: /dev/disk/by-label/nroot
    source: /mnt/nroot/@lxc
  driver: btrfs
  name: default
$ incus -v admin init --preseed incus-preseed.yaml 

I don’t get any errors, the command just hangs.

edit: It hangs because --preseed expects the YAML to be fed via STDIN.

This catches me out every time. It would make sense for --preseed to take a filename as an optional argument or use stdin if that is not given. Initialising incus should be an infrequent event which means this nuance is easily forgotten (like what just happened to me, and how I ended up here!).

1 Like