{"id":21358241,"url":"https://github.com/snacsnoc/msmv","last_synced_at":"2025-10-05T04:43:44.403Z","repository":{"id":244372873,"uuid":"815046219","full_name":"snacsnoc/msmv","owner":"snacsnoc","description":"MicroVM specialized container build system in Python","archived":false,"fork":false,"pushed_at":"2024-07-02T09:45:15.000Z","size":146,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T18:33:33.346Z","etag":null,"topics":["linux-build","linux-containers","linux-virtual-machine","microvm","python-container"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snacsnoc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-14T08:32:27.000Z","updated_at":"2024-07-02T09:45:19.000Z","dependencies_parsed_at":"2024-06-25T06:44:39.340Z","dependency_job_id":"4531cce3-e72d-41c4-8c2b-e66ba9e3e0a6","html_url":"https://github.com/snacsnoc/msmv","commit_stats":null,"previous_names":["snacsnoc/msmv"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snacsnoc%2Fmsmv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snacsnoc%2Fmsmv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snacsnoc%2Fmsmv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snacsnoc%2Fmsmv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snacsnoc","download_url":"https://codeload.github.com/snacsnoc/msmv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830955,"owners_count":20354856,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux-build","linux-containers","linux-virtual-machine","microvm","python-container"],"created_at":"2024-11-22T05:15:12.129Z","updated_at":"2025-10-05T04:43:39.365Z","avatar_url":"https://github.com/snacsnoc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"MuStack MicroVM \n======================\n\nMuStack MicroVM (msmv) is a specialized container build system designed to create and manage minimal, secure, and isolated Linux virtual machine images for microVM environments. \n\nUsing QEMU's [microvm](https://www.qemu.org/docs/master/system/i386/microvm.html) machine type, msmv provides rapid boot times, enhanced security through isolation, and efficient resource management, for developers and hobbyists who require lightweight virtual testing environments.\n\nImagine Docker, except requiring a lot more effort. It’s like building a ship in a bottle — complex, rewarding, frustrating, and yes, a bit intense!\n\n# Usage\n## Configuration\n\nStart by creating a TOML configuration file for your VM. Please see the `recipes/` directory for examples.\n\n# Building the Virtual Machine Image\nNote: it is recommended to use a virtual environment (venv)\n```bash\npython3 -m venv venv\npip install -r requirements.txt \n```\n\nRun the build script with your configuration file:\n\n```bash\npython -m msmv.bin.msmv --config-file my_application.toml\n```\n__Options:__\n* `-c` or `--config-file` - sets the build (recipe) configuration file\n* `-b` or `--build-dir` - sets the build workspace and output directory\n\n__Environment variables:__\n* `MAKE_COMMAND` - specify the `make` command, defaults to `make`\n  * For Mac OS, I would recommend `lkmake` for building the kernel https://github.com/markbhasawut/mac-linux-kdk\n* `CC` - specify the compiler to be used, defaults to `cc`\n* `LD` - specify the linker to be used, defaults to `ld`\n\nThis script will:\n\n* Set up the workspace\n* Download and extract the Linux kernel\n* Configure and build the kernel\n* Download and build the specified applications\n* Set up the root filesystem\n* Put a smile on your face\n* Create the final VM image\n\n# Running the Virtual Machine\n\nAfter building, you can run the VM with QEMU:\n\nExamples:\n```bash\nqemu-system-x86_64 -M microvm -drive file=output_vms/output_image.qcow2,if=virtio -m 128 -nographic -append \"console=ttyS0\" -qmp unix:/tmp/qmp-socket,server,nowait\n```\n\nThe `microvm` machine type is not supported for aarch64, so we must use `virt`:\n```bash\nqemu-system-aarch64 -M virt -cpu max -kernel Image -initrd rootfs.cpio  -append \"init=/init rdinit=/init console=ttyAMA0\" -serial mon:stdio -nographic \n```\n\n# VM Management with VMTool\n\nmsmv includes `VMTool`, a script for managing the VM lifecycle through the QEMU Machine Protocol (QMP):\n\n```bash\npython -m msmv.bin.msmv start   # Starts the VM\npython -m msmv.bin.msmv stop    # Sends a shutdown signal to the VM\npython -m msmv.bin.msmv status  # Queries the current status of the VM\n```\n\n# TODO\n* Use build commands defined in recipe versus assuming `make`\n* Simplify Linux kernel downloading and optionally specify the download URL\n* Create `init` script framework to boot into desired application upon VM start\n* Use script argument to use ccache\n* Pass cross-compiler env vars (`CC`, etc) to build processes\n* Use architecture defined in recipe TOML versus host OS's arch\n* Apply predefined kernel config sets (serial only, framebuffer, debugging etc) before user's config \n  * To reduce requirement for the user to supply all necessary kconfig options in the recipe file\n\n# Contributing\n\nPlease fork the repository, make your changes, and submit a pull request.\n# License\n\nThis project is licensed under the GPL v3 license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnacsnoc%2Fmsmv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnacsnoc%2Fmsmv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnacsnoc%2Fmsmv/lists"}