THIS PROGRAM IS FOR LINUX ONLY, WILL NOT WORK ON MACOS OR WSL
(Because it heavily depends on Linux's KVM)
Inspiration
As we all know, there are a ton of Linux distributions out there and it's somewhat frequent to see things that are interesting but hard to port to the distribution currently being used. Or found something that seems can solve the problem but is from a un-trusted source. It's pretty annoying to deal with this type of situation.
We somehow need face masks for our computers just like in real life.
Containers are not suitable for running untrusted code, and traditional VMs may have too much of overhead.
What it does
It is built based on Firecracker and Linux's KVM to provide a easy way to create and manage lightweight virtual machines.
Firecracker was originally intended for enterprise use and it's API is too funky for home use, it requires at least 3 HTTP API calls just to start a simplest VM.
Asbestos is created to simplify this process and makes managing multiple VMs an easier thing.
How we built it
Use bash and cURL to wrap around firecracker's HTTP API and makes it a proper command line utility.
Challenges we ran into
- Time is not enough. Was originally written in Rust but then I discovered it will take a much longer time than expected so I (temporarily) switched to shell script. Is going to be refactored with Rust.
- Session management is a hard thing to do, especially as I'm planning to ditch
dtach(currently it is used to let firecracker run in background and make it able to share console access via UNIX sockets) and build something similar.
What we learned
- Basics about UNIX's concept of PTY.
- Firecracker's API schema.
- More advanced shell scripting.
What's next for Asbestos
- Refactor with Rust
- More robustness in parsing arguments.
- Build something similar to
dtachand integrate it into the main program.
- Add the ability to interact with guest OS via MMD tagging.
Add the ability to manage TUN/TAP devices.
The ultimate goal is to build something like a low-spec AWS Lambda.
Built With
- bash
- firecracker
- kvm
Log in or sign up for Devpost to join the conversation.