|
|
|
|
|
by hibbelig
1964 days ago
|
|
How would this compare for current users of Docker for Mac? If I use Docker for Mac to run two containers, I get one VM that runs two containers, right? And if I use this, then I get two VMs, one per container? How does the resource usage compare? I have to tell Docker for Mac how much RAM to allocate, and that's then shared between the containers. Can krunvm use as much RAM as the container needs, or does it also need some pre-allocation? |
|
With krunvm, each session initiated with "krunvm start" is an independent lightweight VM. The maximum amount of RAM the VM can use is configured with the "mem" flag (or it uses what's configured by default), but the VMM will always try to use the minimum possible amount of RAM by returning the pages the guest is no longer using to the host (virtio-balloon's free page reporting feature).
That said, you can also start a single VM (using "krunvm start"), run podman's service ("podman system service...") inside it, switch to another terminal in macOS and execute multiple containers inside the VM using "podman remote" [1]. Now I'm thinking I should probably write a tutorial about this option ;-)
[1] https://www.redhat.com/sysadmin/podman-clients-macos-windows