Hacker News new | ask | show | jobs
by tejado 1891 days ago
I wonder how many nested VM inside jail inside a VM inside a jail... are possible from a resource perspective, so that I can still execute a shell
2 comments

For a second you lit up my hope that there would be nested bhyve virtualization, but no. This is a different layer of virtualization/containerization. In order to have nested vm the correct cpu flags (vt-x) have to be exposed in the guest and I believe that such feature is unfortunately not implemented yet.
you can nest jails quite a lot. Although i have not tried it (and cannot find proper sources on the max limit of the amount of jails you can inside a freebsd system).

might be fun to give it a try though.

If FreeBSD has a maximum limit on PIDs that includes those running in jails, you'd probably run into that well before you run out of memory (especially if the goal is to run "as many jails as possible", you can make a whole bunch that effectively do nothing at all).