Bug 238068

Summary: OpenStack Image with cloud-init support?
Product: Base System Reporter: rainer
Component: miscAssignee: freebsd-virtualization (Nobody) <virtualization>
Status: Open ---    
Severity: Affects Some People CC: andrey, emaste, freebsd, grahamperrin, linimon, olevole, pi, rob2g2-freebsd
Priority: ---    
Version: CURRENT   
Hardware: amd64   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238733

Description rainer 2019-05-23 09:23:16 UTC
Hi,

it seems that the qcow2 image of FreeBSD 12.0 does not contain cloud-init support.

There is a PR here:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213396

that adds it, but it doesn't seem to go anywhere.
On top of that, it didn't really work for me.

There are Openstack-ready images for Ubuntu, Fedora, CentOS - basically almost everything.

Is there a reason that the FreeBSD project does not provide one?
Comment 1 Oleg Ginzburg 2019-05-23 09:35:47 UTC
cloud-init does not work on FreeBSD (as a localStorage data source) at the moment. There are many open PR related to FreeBSD at https://git.launchpad.net/cloud-init ( I also opened several ). So, if you can't fix it yourself, you just need to wait.

For example, the latest release of cloud-init has some improvements for FreeBSD (fixes for detect cidata media), and I am creating my own FreeBSD cloud image for the CBSD project[1][2] . But there are some quick hacks ( to apply parameters ) on my part that will never go upstream ( since I did a quick work-around not in cloud-init code )

__
[1] ZFS: https://github.com/cbsd/cbsd/blob/develop/etc/defaults/vm-freebsd-cloud-FreeBSD-zfs-x64-12.0.conf
[2] UFS: https://github.com/cbsd/cbsd/blob/develop/etc/defaults/vm-freebsd-cloud-FreeBSD-ufs-x64-12.0.conf
Comment 2 rainer 2019-05-23 10:53:56 UTC
Hi,

thanks for the update.

I did however now succeed using the official Openstack documentation:

https://docs.openstack.org/image-guide/freebsd-image.html

(using qemu-kvm on my local OpenSuSE workstation to create the image).

cloud-init runs, creates the freebsd-user and I can login.
The partition is also grown.

For now, this is enough for me.

cloud-init requires several python modules and sudo, 43 packages all together.
The RAM-disk created by the installer seems to be just about enough to allow these packages to be downloaded and installed.

I realize that it's the FreeBSD project's intention not to pollute the installation-image with anything that is not in tree.

But increasingly, FreeBSD will be installed virtually and users in the cloud expect certain things to "just work".
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2021-06-30 00:16:41 UTC
^Triage: reassign.

To submitter: is this PR still relevant in the FreeBSD 13.X timeframe?
Comment 4 rainer 2021-06-30 06:56:11 UTC
Hi Mark,

it is relevant in that FreeBSD does not provide a cloud-ready image as of now.

Additionally, I've run into other problems running FreeBSD on top of KVM (which are documented in another PR).
Comment 5 Ed Maste freebsd_committer freebsd_triage 2021-11-05 18:46:39 UTC
(In reply to rainer from comment #4)
> which are documented in another PR

Would you care to add a See-also reference to that PR
Comment 6 Graham Perrin freebsd_committer freebsd_triage 2022-12-10 17:02:27 UTC
<https://www.freshports.org/net/cloud-init-devel/>

> Init scripts for use on cloud images, development version

Fall Foundation Software Development Update | FreeBSD Foundation
<https://freebsdfoundation.org/blog/fall-foundation-software-development-update/>

* emaste@ the github.com/Jehops/⋯ link for the FreeBSD Handbook is 404


FreeBSD as a Tier I cloud-init Platform | FreeBSD Foundation
<https://freebsdfoundation.org/project/freebsd-as-a-tier-i-cloud-init-platform/>