Re: Building VM-IMAGE(s) from Source
Anthony Pankov <[email protected]> Thu, 16 Apr 2026 17:51:16 +0300
| Newsgroups | gmane.os.freebsd.devel.hackers,gmane.os.freebsd.stable,gmane.os.freebsd.current |
|---|---|
| Message-ID | <[email protected]> |
Thursday, April 16, 2026, 3:44:54 PM, you wrote:
> Yes and no.
> For a start - I do not see options for PKGBASE in the poudriere-image(8) man page ... so I am not sure if I end up with PKGBASE system (probably not) or classic Distribution Sets system - but that can (can?) be probably configured some undocumented way.
> I already have a system that builds packages - so 3rd party packages are ready in some repo.
> I also already have a system that builds PKGBASE repo - so PKGBASE packages are ready.
> So when I will try to use poudriere-image(8) instead of verimg(8) I would have these downgrades:
> - I need to build PKGBASE FreeBSD 'Base System' everytime from source (which I do not need/want).
> - I need to build 3rd party pkg(8) packages from FreeBSD Ports (which I do not need/want).
> - I can not create custom/additional ZFS datasets and custom ZFS filesystem sizes.
> - I can not create additional FAT32 filesystems with configs for cloud-init(1) use.
> - I am not sure if poudriere-image(8) supports geli(8) - which I also sometimes need in images - and I plan to add geli(8) support to verimg(8) ... and I doubt it will be added to poudriere-image(8) anytime soon.
> With verimg(8) I just use PKGBASE packages as 'Base System' from repo I previously built and then add 3rd party pkg(8) packages from other repo that I already built. That way I 'suffer' once and then I can build various images in minutes/seconds - not in long hours compiling everything each time.
> One can also as a question ... why FreeBSD as a project maintains 3 different 'building systems'?
> 1. We have 'classic' # make buildworld buildkernel update-packages at /usr/src dir.
> 2. We have 'release.sh' inside /usr/src/release dir.
> 3. We have poudriere-image(8) for similar purposes.
> 4. We also have mkimg(8) which is used by both 'release.sh' and poudriere-image(8) tools.
> But as they exists ... so I can only assume that they all are needed.
Just for note. I also ended with self-made script. It relies on "prepared system directory". Directory with extracted pkgbase and other things. It usages looks like:
#
Make virtual machine image from prepared system
Usage
mkvm [options] -o image_file system_dir {extra_dir}
where:
image_file - target VM image file
(dir of this file will be used for temporary flies)
system_dir - dir of prepared (installed) system
extra_dir - optional one or more directories which will be
merged over system_dir during
root filesystem creation
#
--
Best regards,
Anthony