Live data from Hacker News

Microsandbox: Virtual Machines that feel and perform like containers

github.com

51–60 of 195 posts

Re: Microsandbox: Virtual Machines that feel and perform like containers

#51
post #44

I've been looking for something I could host for this kind of thing - for LLM agents. Ended up on https://www.daytona.io/ as I couldn't find anything suitable to self host and realised it was a complex thing to manage. It seems Daytona is open source, including the server platform, but there is no documentation for the server element. Azure also seem to offer a service for this, it's a space that is growing rapidly.

Microsandbox is for people that would like to maintain their own infra. I'm not going to stop trying to make it better to self-host.

Re: Microsandbox: Virtual Machines that feel and perform like containers

#52

Earlier quoted context omitted.

> You have to allocate memory, start virtual CPUs, initialize devices, run BIOS/UEFI checks, perform hardware enumeration, all that jazz while emulating all of it, which tends to be slower than "real" implementations. That's not what I'm asking. I'm saying it takes a long time for it to even execute a single instruction, in the BIOS itself. Even for the window to pop up, before you can even pause the VM (because it h…

Without any context in terms of what the VM is doing or what VMM software you use, my best guess is that the OS/VMM are pre-allocating memory for the VM. This might involve paging out other processes' memory, which could take some time. I think task manager would tell you if there is a blip of memory usage and paging activity at the time. And I'm sure windows itself has profilers that can tell you what is happening w…

For some reason I can't reply to your reply. I'd strongly suggest that you profile virtual box. It beats speculation..

Re: Microsandbox: Virtual Machines that feel and perform like containers

#53
post #12

Why not some of the existing microvm efforts? Cloud Hypervisor and Firecracker both have an excellent reputation for ultra lightweight VM's. Both are usable in the very popular Kata Containers project (as well as other upstart VM's Dragonball, & StratoVirt). In us by for example the CNCF Confidential Containers https://github.com/kata-containers/kata-containers/blob/main... https://confidentialcontainers.org/ There's…

If we get enough of these sandboxes, maybe we will finally get one that's easy for me to run on my own machines.

Exactly my thoughts when I read the headline, after having read a similar one every few months.

However, by looking at it and playing with a few simple examples, I think this is the one that looks the closest so far.

Definitely interested to see the FS support, and also some instruction on how to customize the images to e.g. pre-install common Python packages or Rust crates. As an example, I tried to use the MCP with some very typical use-cases for code-execution that OpenAI/Anthropic models would generate for data analysis, and they almost always include using numpy or a excel library, so you very quicly hit a wall here without the ability to include libraries.

Re: Microsandbox: Virtual Machines that feel and perform like containers

#54
post #48

Earlier quoted context omitted.

> You have to allocate memory, start virtual CPUs, initialize devices, run BIOS/UEFI checks, perform hardware enumeration, all that jazz while emulating all of it, which tends to be slower than "real" implementations. That's not what I'm asking. I'm saying it takes a long time for it to even execute a single instruction, in the BIOS itself. Even for the window to pop up, before you can even pause the VM (because it h…

In defense of the replies, your initial question was very vague and left people to assume you meant the obvious thing.

Sure, that's why I clarified.

Re: Microsandbox: Virtual Machines that feel and perform like containers

#55
post #42

Are the SDKs AI generated? I looked at the Crystal, Ruby, and Zig ones and all they contain is a hello world example with some docs that have little to do with the code. Sorry if this comment seems rude, just curious.

The other SDKs are generated hello-worlds at the moment. I will get to them one by one, but I welcome and appreciate any contributions to them.

Re: Microsandbox: Virtual Machines that feel and perform like containers

#56

Earlier quoted context omitted.

You can optimize a lot to start a Linux kernel in under a second, but if you're using a standard kernel, there are all manners of timeouts and poll attempts that make the kernel waste time booting. There's also a non-trivial amount of time the VM spends in the UEFI/CSM system preparing the virtual hardware and initializing the system environment for your bootloader. I'm pretty sure WSL2 uses a special kernel to avoid…

That's not what I'm asking about. I'm saying it takes a long time for it to even execute a single instruction, in the BIOS itself. Even for the window to pop up, before you can even pause the VM (because it hasn't even started yet). What you're describing comes after all that, which I already understand and am not asking about.

probably the intel ME setting up for virtualization in a way that it can infiltrate

Re: Microsandbox: Virtual Machines that feel and perform like containers

#57
post #22

Earlier quoted context omitted.

Looks great! This might be extremely useful for a distributed/decentralized software testing network I'm building (called Valet Network)... Question: How does networking work? Can I restrict/limit microvms so that they can only access public IP addresses? (or in other words... making sure the microvms can't access any local network IP addresses)

Yes! With the `scope` property. https://github.com/microsandbox/microsandbox/blob/0c13fc27ab...

thanks! have an example on how to use that in a sandboxfile?

(also, this project is really cool. great work!)

Re: Microsandbox: Virtual Machines that feel and perform like containers

#58
post #38

Earlier quoted context omitted.

Try disabling Windows Defender and trying again.

Are you just guessing or have you actually seen the delay I'm talking about disappear as a result of this (or as a result of anything else for that matter)? Because I've already done this (yes, entirely, even the kernel mode drivers) and it's definitely not the issue.

There was a release of subversion back in the day that reduced the number of files that were opened during a repo action like pull, and the number of times any one file got opened. On Linux it ran about 2-3x faster. Very nice change.

On windows it was almost 10x faster. On the project where this change was released, my morning ritual was to come in, log on, run an svn pull command, lock my screen and go get coffee. I had at least ten minutes to kill after I got coffee, if the pot wasn’t empty when I got there.

Windows is hot garbage about fopen particularly when virus scanning is on.

Re: Microsandbox: Virtual Machines that feel and perform like containers

#59
Congrats on launching! Booting VMs in milliseconds is certainly important, but it can also be achieved with CloudHypervisor/Firecracker. Where Containers beat VMs is runtime perf. The overhead in case of VMs stems from emulation of IO devices. I believe the overhead will become noticeable for AI agentic use cases. Any plans to address perf issues?

Re: Microsandbox: Virtual Machines that feel and perform like containers

#60
post #4

Wow. This looks awesome. Can we build our own python sandbox using the sandboxfile spec? This is if I want to add my own packages. Would this be just having my own requirements file here - https://github.com/microsandbox/microsandbox/blob/main/MSB_V...

Thank you! > Can we build our own python sandbox using the sandboxfile spec? Yes and I plan to make that work with the SDK. PS: Multi-stage build is WIP.

Great will join the discord. Is this embeddable? Will it work with a cross platform desktop app(Tauri)?
Post reply on HN