Running `libguestfs` on Mac
When preparing VM images it is convenient to directly edit the contents of the image disk. libguestfs
and its various tools (e.g. virt-customize
) are the standard way of doing this.
No package managers on Mac OS currently package these, so it is easiest to run the tools in a Docker container.
I created and published a minimal container image as all other images are unpublished, unsupported, or not minimal:
Details
- Based on Alpine Linux
- Installs
guestfs-tools
withapk
fromedge/testing
- Downloads a "fixed appliance" from the official website.
- This is the VM image which
libguestfs
uses as the host OS for its operations - It is called "fixed" because it does not rely on the supermin tool being installed.
- This is the VM image which
- Requires wrapper scripts to handling the mounting of input files and output directories. Examples included in the GitHub repository
Appendix
- There is a [legacy Homebrew issue] about
libguestfs
.