LinkedIn Sourceforge

Vincent's Blog

Pleasure in the job puts perfection in the work (Aristote)

Category: VM

Cloning FreeBSD Jails with ZFS: Fast Copies, Hidden Dependencies

Posted on 2026-10-10 22:18:00 by Vincent in FreeBSD VM

Give a shoutout to  Claude.ai In my previous post I built a minimal thick jail from pkgbase packages and ended with a baseline ZFS snapshot. That snapshot is more than a safety net: it is a template. With a single command you can stamp out as many jails as you need, each one ready in a second and using almost no extra disk space.

But clones come with a property that surprises people: a ZFS clone is not a plain copy. It stays linked to the snapshot it came from, and that link decides what you can and cannot destroy later. In this post I clone one jail into four, list the few things that must be changed in each copy, explain how upgrades behave, and show three ways to deal with the dependency between a clone and its origin.

Read more

FreeBSD Thick Jails the pkgbase Way: A Minimal, Working Setup

Posted on 2026-10-10 21:19:00 by Vincent in FreeBSD VM

Give a shoutout to  Claude.ai For years, building a FreeBSD jail meant downloading base.txz, extracting it by hand, and later juggling freebsd-update(8) to keep it patched. With FreeBSD 15, the base system is also available as regular packages, a method known as pkgbase, and jails are where it shines: you install exactly the pieces you need, update them with the same tool you use for everything else, and keep the whole thing on its own ZFS dataset that can be snapshotted, rolled back and cloned in seconds.

In this post I build a minimal but functional thick jail (a full, self-contained copy of the userland) from scratch, from dataset creation to a running system with SSH. I also share the one mistake that cost me an afternoon, a userland newer than the host kernel that made the jail hang on shutdown, along with the commands to avoid or fix it. Everything here comes from a real FreeBSD 15.1 setup. Adapt the pool, dataset and network names to yours.

Read more

Converting a FreeBSD Jail with pkgbasify

Posted on 2026-10-10 09:40:00 by Vincent in FreeBSD VM

Give a shoutout to  Claude.ai For years, keeping a FreeBSD system up to date meant running freebsd-update(8), which patches the base system as a single, opaque block. pkgbase changes that model: the base system is split into ordinary packages that you can install, query and upgrade with pkg(8), just like any other software. The pkgbasify script can convert an existing installation, but it rewrites the whole base system, which makes it a poor first experiment on a machine you care about. A jail is a much better laboratory. It is isolated from the host, cheap to create and, with ZFS, trivial to roll back. In this article I walk through converting a classic jail to pkgbase from start to finish, including the one jail parameter that makes the conversion fail if you forget it. I then show how to upgrade the result to a newer minor release, all without touching the host.

Read more

Upgrade a FreeBSD host running several jails

Posted on 2025-06-19 22:47:00 by Vincent in FreeBSD VM

This is more for my own needs, but I propose in this post to describe all steps required to upgrade a FreeBSD hsot running version 14.2 to the last version 14.3. And to particularely see what must be done for the jails running on it.

VM running on such host are not in the scope of the post since a VM is totally independant of the host.

Read more

Install immich on Docker, on RockyLinux, on Bhyve, on FreeBSD on Odroid ;)

Posted on 2025-06-17 20:57:00 by Vincent in FreeBSD VM

I would show how easy it is to install a docker app on a FreeBSD host. I've taken the choice of the Image viewer called Immich which is not available on BSD systems.

Read more

How to move bhyve VM and Jail container from one host to another host ?

Posted on 2025-02-16 10:21:00 by Vincent in FreeBSD VM

After having played with bhyve VM and Jail container in my previous posts, I'm investigating here how to migrate them from one host to another.

Unfortunately FreeBSD does not have "live migration" yet. But here you will see that the downtime could be around 1 second. For many applications such down time is not noticeable

Read more

Let's investigate FreeBSD jail versus bhyve VM

Posted on 2025-02-09 11:52:00 by Vincent in FreeBSD VM

In my previous blog post I was discovering FreeBSD VM and their impact on performance.

In this blog I'll compare a FreeBSD VM with a FreeBSD Jail

How complex is it to build, what are the steps, ...

And do we have the expected performance from those Jails

Read more

Which platform is the best to run FreeBSD VM ? Linux/KVM or FreeBSD/bhyve ?

Posted on 2025-02-02 18:14:00 by Vincent in FreeBSD VM

I would invest time and energy on the setup of VM, but on which platform ? Since +15 years, I like BSD systems, but I hear more and more persons promoting Linux/KVM platforms. Should I re-invest (I started with Linux before 2000) my time on Linux ecosystem ? Lot of elements must be taken into account to answer such question, but in this blog I'll focus on the performance aspects. More specifically, I'll compare Linux/KVM and FreeBSD/bhyve. And I'll use tests representative for me which are mainly compute and filesystem. The network part is also important, but the machine I will use for such study is not a good one for that.

Update February 9th 2025: I have added a comparison between virtio-blk and nvme

Read more