hcartiaux / openbsd-cloud-image

Qcow2 image builder for OpenBSD
12 stars 7 forks source link

OpenBSD 7.5 cloud-init network fails with cloud image #6

Open ivomarino opened 1 month ago

ivomarino commented 1 month ago

Not sure if it's a bhyve issue or and issue in the OpenBSD image, I repost here for reference: https://github.com/churchers/vm-bhyve/issues/559

hcartiaux commented 1 month ago

Hi,

Can you please log into the new system using the console and list the network interfaces with ifconfig ?

It works with linux/libvirt/kvm but I admit I've not deployed it in a while.

ivomarino commented 1 month ago

thanks for your feedback @hcartiaux, this is a snippet of the boot log I get:

    return self.distro.apply_network_config(
  File "/usr/local/lib/python3.10/site-packages/cloud_init-24.1.4-py3.10.egg/cloudinit/distros/__init__.py", line 439, in apply
_network_config
    network_state = parse_net_config_data(netconfig, renderer=renderer)
  File "/usr/local/lib/python3.10/site-packages/cloud_init-24.1.4-py3.10.egg/cloudinit/net/network_state.py", line 1107, in par
se_net_config_data
    nsi.parse_config(skip_broken=skip_broken)
  File "/usr/local/lib/python3.10/site-packages/cloud_init-24.1.4-py3.10.egg/cloudinit/net/network_state.py", line 305, in pars
e_config
    self.parse_config_v2(skip_broken=skip_broken)
  File "/usr/local/lib/python3.10/site-packages/cloud_init-24.1.4-py3.10.egg/cloudinit/net/network_state.py", line 361, in pars
e_config_v2
    self._v2_common(command)
  File "/usr/local/lib/python3.10/site-packages/cloud_init-24.1.4-py3.10.egg/cloudinit/net/network_state.py", line 824, in _v2_
common
    self._handle_individual_nameserver(name_cmd, iface)
  File "/usr/local/lib/python3.10/site-packages/cloud_init-24.1.4-py3.10.egg/cloudinit/net/network_state.py", line 119, in decorator
    return func(self, command, *args, **kwargs)                                                                                  File "/usr/local/lib/python3.10/site-packages/cloud_init-24.1.4-py3.10.egg/cloudinit/net/network_state.py", line 603, in _han
dle_individual_nameserver                                                                                                          _iface[iface]["dns"] = {"nameservers": nameservers, "search": search}
KeyError: 'vio0'                                                                                                               ------------------------------------------------------------
Cloud-init v. 24.1.4 running 'init' at Thu, 03 Oct 2024 09:57:24 +0000. Up 21.715256214141846 seconds.                         ci-info: +++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++
ci-info: +--------+-------+----------------+------------+-------+------------+                                                 ci-info: | Device |   Up  |    Address     |    Mask    | Scope | Hw-Address |
ci-info: +--------+-------+----------------+------------+-------+------------+                                                 ci-info: |  enc0  | False |       .        |     .      |   .   |     .      |
ci-info: |  lo0   |  True |   127.0.0.1    | 0xff000000 |   .   |     .      |                                                 ci-info: |  lo0   |  True |    ::1/128     |     .      |   .   |     .      |
ci-info: |  lo0   |  True | fe80::1%lo0/64 |     .      |  0x3  |     .      |
ci-info: | pflog0 |  True |       .        |     .      |   .   |     .      |
ci-info: |  vio0  | False |       .        |     .      |   .   |     .      |
ci-info: +--------+-------+----------------+------------+-------+------------+

considering that I don't have network access I can't access via ssh using the provisioned ssh key. Is there a default root password to login via console to check? Thanks

hcartiaux commented 1 month ago

The root password is disabled in the install.conf. It's set to ‘*****’ (13 '*'s).

This issue seems to be in cloud-init upstream (with the set-name options). I've tried to generate a new image with cloud-init 24.3, I will double check when I will have spare time ;)