Live data from Hacker News

Microsandbox: Virtual Machines that feel and perform like containers

github.com

111–120 of 195 posts

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

#112
post #104

> Ever needed to run code you don't fully trust? Then the installation instructions include piping a remote script directly to Bash ... Oh irony ... That said, the concept itself is intriguing.

Your statement initially went over my head. Sorry lol. You can always download the installer script and audit yourself. I will set up proper distribution later.

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

#113
post #96

Thanks for sharing! I'm the creator of microsandbox. If there is anything you need to know about the project, let me know. This project is meant to make creating microvms from your machine as easy as using Docker containers. Ask me anything.

I'm trying this out now and it's very promising. One problem I'm running into with the Python library is that I'd like to keep that sandbox running for several minutes while I do things like set variables in one call and then use them for stuff several calls later. I keep seeing this error intermittently: Error: Sandbox is not started. Call start() first Is there a suggested way of keeping a sandbox around for longer…

async with is just syntactic sugar. You could very well call __aenter__ and __aexit__ manually. You could also use an AsyncExitStack, call __aenter__ manually, then enter_async_context, and call aclose when you’re done. Since aclose method exists I guess this is not an anti-pattern.

https://docs.python.org/3/library/contextlib.html#contextlib...

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

#114
post #111

There are python and node environment for this, so they are not VMs in the sense that I can host a OS and arbitrary executables?

They are Linux VMs and you can host any executable that can work on that. The python/node environment you see is part of what makes the SDK work. Really, it's very similar to Docker in use.

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

#115

Earlier quoted context omitted.

You cannot build a secure container runtime (against malicious containers) because underlying it is the Linux kernel. The only way to make Linux containers a meaningful sandbox is to drastically restrict the syscall API surface available to the sandboxee, which quickly reduces its value. It's no longer a "generic platform that you can throw any workload onto" but instead a bespoke thing that needs to be tuned and rec…

> ... drastically restrict the syscall API surface available to the sandboxee, which quickly reduces its value ... Depends I guess as Android has had quite a bit of success with seccomp-bpf & Android-specific flavour of SELinux [0] > Until we have a properly hardened and memory safe OS ... faster than running MicroVMs on a Linux host. Andy Tanenbaum might say, Micro Kernels would do just as well. [0] https://youtu.be…

You also have gVisor, which runs all syscall through some Go history that's supposedly safe enough for Google.

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

#116

Earlier quoted context omitted.

I remembered something about VirtualBox not playing nicely with Hyper-V on Windows, and dug up a possibly relevant post[0] on their forums. IIRC we ended up moving a few build systems to Docker and dropping VirtualBox because of hyper-v related issues, but it's been a few years. [0] https://forums.virtualbox.org/viewtopic.php?t=112113

That's the unrelated green-turtle issue. It's only relevant after the guest has actually started running instructions. I'm talking about before that point.

I'm not aware of any turtles, that was just the first thing I found when trying to see if VirtualBox and Hyper-V were still a problematic combo.

Again, it was a few years ago, but we didn't solve the problem or identify an actual root cause. We stopped banging our heads against that particular wall and switched technologies.

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

#117
post #111

There are python and node environment for this, so they are not VMs in the sense that I can host a OS and arbitrary executables?

They are Linux VMs and you can host any executable that can work on that. The python/node environment you see is part of what makes the SDK work. Really, it's very similar to Docker in use.

thank you. Is there any "docker host" or centralized repo where I can pull VMs from?

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

#118
post #117

Earlier quoted context omitted.

They are Linux VMs and you can host any executable that can work on that. The python/node environment you see is part of what makes the SDK work. Really, it's very similar to Docker in use.

thank you. Is there any "docker host" or centralized repo where I can pull VMs from?

We support just Docker hub for now. Let me know if you want any other OCI-compatible registry.

PS: microsandbox will likely have its own OCI registry in the future

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

#119

Tangential question: why does it normally take so long to start traditional VMs in the first place? At least on Windows, if you start a traditional VM, it takes several seconds for it to start running anything . Edit: when I say anything , I'm not talking user programs. I mean as in, before even the first instruction of the firmware -- before even the virtual disk file is zeroed out, in cases where it needs to be. Yo…

Try Windows Server Core on an SSD. I've seen VMs launch in low single-digit seconds. You can strip it down even further by removing non-64-bit support, Defender, etc...

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

#120
post #32

Earlier quoted context omitted.

I think you need to provide more details on what VM software you’re using. On VirtualBox what you describe is very noticeable, and it didn’t have that delay in older versions. So it could be just an issue with that VM software and not a general “traditional VMs” issue.

Yup I'm asking about VirtualBox mainly, I just don't understand what the heck it's doing during that time that takes so long. Although I don't recall other VMs (like say, Hyper-V) being dramatically different either (ignoring WSL2 here).

Linux KVM/qemu VMs start pretty fast.
Post reply on HN