Bug 213396 - official FreeBSD vm image not runing on openstack
Summary: official FreeBSD vm image not runing on openstack
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: FreeBSD Release Engineering
Keywords: patch
Depends on: 215258
  Show dependency treegraph
Reported: 2016-10-11 22:27 UTC by Mikhail
Modified: 2019-06-05 14:35 UTC (History)
6 users (show)

See Also:

update the OpenStack with configuration with cloudware common options. (1.83 KB, patch)
2016-12-05 03:51 UTC, Diego Casati
no flags Details | Diff
add OPENSTACK as an option to Makefile.vm (287 bytes, patch)
2016-12-05 03:52 UTC, Diego Casati
no flags Details | Diff
/usr/src/release/tools/openstack.conf (1.39 KB, patch)
2018-10-12 15:00 UTC, Pasquale Carlo Maiorano Picone
no flags Details | Diff
Latest version of proposed patch (2.88 KB, patch)
2018-10-16 09:39 UTC, Pasquale Carlo Maiorano Picone
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail 2016-10-11 22:27:19 UTC
I am trying to run FreeBSD-11.0 on ibm bluemix cloud virtual machine(openstack based), but it thow error: "Flavor's disk is too small for requested image."
I am trying to use official image from ftp://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/11.0-RELEASE/amd64/Latest/FreeBSD-11.0-RELEASE-amd64.qcow2.xz of course i unxz it.
Maybe you have created big image file more than 20gig and maybe better to delete swap partition from image.
Many clouds providers are using small openstack flavor with 20gig max disk size, but your official image seems bigger because of it i can not run official image on ibm bluemix, hp cloud or any other openstack cloud provider.
Moreover it is better is you will publish unxz image of vm because openstack can not understand xz archive and now evry cloud user must download image from your ftp than unxz it and than upload it to openstack cloud provider. But if you publish image in qcow2 format(not zipped with xz) evry cloud provider can once download your image and than just use it for all who put same url. It will realy slow down your server load.
Comment 1 Diego Casati 2016-12-05 03:51:32 UTC
Created attachment 177673 [details]
update the OpenStack with configuration with cloudware common options.

Hi --

This patch adds the following functionality to the FreeBSD OpenStack image:

- resize FreeBSD to the size of the OpenStack flavor (growfs).
- speeds up the boot process by disabling sendmail.
- allows an user to ssh as root with a public key.
- make ssh respond faster by disabling DNS lookups (can be reverted).
- enable DHCP on the vtnet interface.

This will generate a qcow2 image with 1.4G in size. The entire process uses the release(7) toolchain to generate the image and should work with newer versions of FreeBSD. Tested with 11.0-RELEASE-p1 and also tested on OpenStack Mitaka.

To generate your own image:

1. Follow the regular process of build(7) -  buildworld buildkernel
2. cd /usr/src/release
3. make cloudware-release WITH_CLOUDWARE=yes CLOUDWARE=OPENSTACK

I still need to test the full functionality of cloud-init but overall it looks ok.

comments? ok?

Comment 2 Diego Casati 2016-12-05 03:52:36 UTC
Created attachment 177674 [details]
add OPENSTACK as an option to Makefile.vm

Adds an option for building OpenStack specific images.
Comment 3 vali gholami 2017-12-17 07:15:02 UTC
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2018-09-05 22:14:30 UTC
To submitter: is this patch still relevant?
Comment 5 Diego Casati 2018-09-05 22:47:54 UTC
Hi Mark,

Iā€™m not sure if this is relevant right now as I lost access to the system to test it. Perhaps the submitter could take a look. 

Comment 6 Pasquale Carlo Maiorano Picone 2018-10-10 15:51:47 UTC
Hi all,

I'm testing the patch submitted by Diego because I need an Openstack image of FreeBSD. I will let you know if it still works.

Best Regards,
Comment 7 Pasquale Carlo Maiorano Picone 2018-10-11 14:58:39 UTC
Hi all,

The built image boot and is reachable on Openstack Pike, btw the ssh key is not injected and there are no logs on horizon log tab. I will run other tests and try other configurations.

Best Regards
Comment 8 Pasquale Carlo Maiorano Picone 2018-10-12 15:00:35 UTC
Created attachment 198066 [details]

This is the updated version of Openstack.conf in order to generate FreeBSD Openstack images with CLOUDWARE.
Comment 9 Pasquale Carlo Maiorano Picone 2018-10-12 15:12:16 UTC
I've tested, modified the "update the OpenStack with configuration with cloudware common options" attachment and re-uploaded as openstack.conf as tested version of the patch. I've also used the patch proposed by Diego to Makefile.vm. I'm currently working also on rsyslog integration in the image generation.

Best Regards
Comment 10 Pasquale Carlo Maiorano Picone 2018-10-16 09:39:18 UTC
Created attachment 198200 [details]
Latest version of proposed patch

This is the latest, tested version of Openstack configuration with CLOUDWARE
Comment 11 Pasquale Carlo Maiorano Picone 2018-12-14 16:13:51 UTC
added everything on https://github.com/charliemaiors/freebsd-openstack-image
tested with FreeBSD 11.x and FreeBSD 12.0