Skip to content

develop automation to build BSD images #20

@jbpratt

Description

@jbpratt

*BSD images can't use the guestfs-tools, mainly due to UFS, therefore we need to write the customization of these images using an alternative tool. virt-lightning seems like an easy enough way forward thanks to all of the hard work from @goneri as well on the *BSD side and cloud-init support.

  • FreeBSD
  • NetBSD
  • OpenBSD
  • DragonFlyBSD

As per our general baseline requirements for an image, we should aim to customize the images in three main ways:

  1. QEMU guest agent should start on boot
  2. Ability to SSH using the service after qemu-guest-agent propagates keys
  3. Console is available out of the box

Working with @goneri to support qemu-ga out of the box upstream. Thanks to this work, we will simply need to download the image, skip customization then package it.

From here, the standard automation for packaging can kick in as if the image has been downloaded and skip customization the same way we implemented for *CoreOS. After packaging, tests will be kicked off to validate qemu-guest-agent starts on boot and ssh is available via the k8s service exposed.

Resources:
https://www.freshports.org/emulators/qemu-guest-agent
https://undeadly.org/cgi?action=article;sid=20200514073852
https://github.com/virt-lightning/virt-lightning
https://bsd-cloud-image.org

Things to keep in mind:

  • While testing cloud-init, we were seeing OpenBSD restarting every 1-2 minutes. This stopped after doubling the memory to 4G.
  • cloud-init networking should be set up slightly different than usual (requiring matching on the mac_address)
  • /bin/bash is not available, we should stick to the default shell

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions