News for hackers. Stuff that matters.
Re:My VM is lighter (and safer) than your container (2017) by zerof1l on Tuesday May 14, 2024 @09:01AM (#40354775)
Docker has a big community, lots of guides, and ready-to-use containers. It became pretty much a de facto standard for self-hosting things. You also have a very high chance of getting a piece of software to work out of the box as intended with Doker. The only way this or some other way of running stuff will overtake Doker is if it will match the Docker in these aspects.

As much as I'd love to try this lightweight VM idea, I don't have the time or energy to convert 20+ projects I'm self-hosting into this and then keep everything updated. I'd rather invest this time into learning Docker more and making my existing setup more secure and robust.

Re:My VM is lighter (and safer) than your container (2017) by fhuici on Tuesday May 14, 2024 @09:15AM (#40354900)
Maybe try out kraft.cloud: we take Dockerfiles as input and automatically convert to lightweight VMs/unikernels when deploying (disclaimer: I'm one of the paper's authors and one of the people behind KraftCloud).
Re:My VM is lighter (and safer) than your container (2017) by sureglymop on Tuesday May 14, 2024 @09:50AM (#40355218)
I recently built a similar thing for learning purposes using firecracker + the firecracker go api. I wrote a small init system in rust and combined that with filesystem images derived from the Debian, Ubuntu etc. container images (that can be extended with more layers).

What really surprised me the most, is how quick and simple it is to compile the linux kernel. Cloned a tag with --depth 1, configured it and then it took ~ 5 minutes to build vmlinuz.bin. As someone who is too young to have had to regularly do that, I had heard multiple stories of how long that's supposed to take but it really doesn't.

I then tried to move from firecracker to qemu microvms but didn't get that far yet since I didn't have more time.

All in all a great learning experience and if I wasn't an undergrad student with no time, I'd love to build a service/business around it.

Re:My VM is lighter (and safer) than your container (2017) by jetbalsa on Tuesday May 14, 2024 @10:48AM (#40355784)
it /used/ to take forever back in the Core 2 Duo days, with the amount of cores and the sheer speed of the IPC its gotten a ton better.
Re:My VM is lighter (and safer) than your container (2017) by DEADMINCE on Sunday May 19, 2024 @10:54PM (#40411734)
> I had heard multiple stories of how long that's supposed to take but it really doesn't.

It used to, but that's why they are only stories now.

Re:My VM is lighter (and safer) than your container (2017) by FridgeSeal on Tuesday May 14, 2024 @09:30AM (#40355050)
Wow!

I came across Unikraft a while ago and went “wow that’s cool, but I have no idea how to use this”, cloud offering and docs you have up there now look amazing! Will 100% be giving this a go first thing tomorrow!!

Re:My VM is lighter (and safer) than your container (2017) by __jonas on Tuesday May 14, 2024 @09:37AM (#40355113)
I thought that’s what fly.io is, although I’m not familiar with it, am I missing something?
Re:My VM is lighter (and safer) than your container (2017) by FridgeSeal on Tuesday May 14, 2024 @09:53AM (#40355238)
Fly: takes your docker image, converts it into a Firecracker VM and runs that: kernel boundaries etc are all the same as before (and the same as running your container locally).

Kraft Cloud: takes your docker image, and turns it into a “unikernel”, and runs that. In a unikernel, your application _is_ the kernel. There’s no process boundary, no kernel-space/userspace split there’s a single address-space etc.

I believe the idea is that you get a perf benefit-as your application is often the only one running in the container, security is provided by the hupervisor anyways, so may as well cut out all the middle layers that aren’t getting you much. Seems some of the authors/founders of Unikraft are in the comments, they can explain much better than I.

Re:My VM is lighter (and safer) than your container (2017) by surajrmal on Tuesday May 14, 2024 @10:47AM (#40355775)
It sounds like consequences of bugs like memory corruption are far more challenging to deal with in the Kraft cloud situation. Sometimes isolation has other benefits.
Re:My VM is lighter (and safer) than your container (2017) by rakoo on Tuesday May 14, 2024 @01:08PM (#40357414)
Isn't that better isolation though ? A memory corruption will at worse break the OS which is the app and nothing else. Push the model further and you can have one unikernel per user and reduce even further the consequences of bugs
Re:My VM is lighter (and safer) than your container (2017) by fhuici on Tuesday May 14, 2024 @03:46PM (#40359343)
Hey, author/founder here, thanks for providing that answer, all correct there :) . I would also add that KraftCloud unikernels are built using Unikraft, and that its modularity allow us to tailor/specialize those images to obtain great perf.

Finally, we also had to design and implement a controller from scratch -- nothing out there provided the millisecond semantics and scalability we needed (plus we also did tweaks to network interface creation and a few other things to get the end to end experience to be fast).

Re:My VM is lighter (and safer) than your container (2017) by FridgeSeal on Tuesday May 14, 2024 @05:25PM (#40360329)
That sounds amazing! Very keen to give it a try.

My work had a product that was doing builds and hosting for arbitrary client code, you’re doing all that, plus more. I’ve got massive respect for that, because there were some hard problems to solve, even in our pretty vanilla environment- looks like you guys have done a far better job than we did, plus more!

Re:My VM is lighter (and safer) than your container (2017) by kylecordes on Tuesday May 14, 2024 @09:24AM (#40354991)
That is a very clever idea!
Re:My VM is lighter (and safer) than your container (2017) by jve on Tuesday May 14, 2024 @09:08AM (#40354846)
Ahem, this is a research paper. You should look at this stuff as "Innovation" and someone may just consider building a tool or product on the idea... or not.
Re:My VM is lighter (and safer) than your container (2017) by fhuici on Tuesday May 14, 2024 @03:49PM (#40359370)
Author here, we did this, first by continuing the research alongside the creation of the Unikraft LF OSS project -- the result of which was the Eurosys 2021 best paper award (https://dl.acm.org/doi/10.1145/3447786.3456248).

Commercially, we leverage Unikraft on kraft.cloud to provide a cloud platform with millisecond semantics.

Re:My VM is lighter (and safer) than your container (2017) by jeltz on Tuesday May 14, 2024 @09:07AM (#40354837)
The ready-to-use is only true for the most popular software like PostgreSQL. Anything else is often broken and/or unmaintained.
Re:My VM is lighter (and safer) than your container (2017) by gbalduzzi on Tuesday May 14, 2024 @09:44AM (#40355174)
In web development I had never experienced an issue with the commonly used softwares
Re:My VM is lighter (and safer) than your container (2017) by DEADMINCE on Tuesday May 14, 2024 @10:55AM (#40355854)
> making my existing setup more secure and robust.

The first step should be to not be so entirely reliant on Docker.

Re:My VM is lighter (and safer) than your container (2017) by k8sToGo on Tuesday May 14, 2024 @09:05AM (#40354817)
Especially with something like linuxserver.io
Re:My VM is lighter (and safer) than your container (2017) by BobbyTables2 on Tuesday May 14, 2024 @09:27AM (#40355018)
It’s amazing what a few hundred million in VC funding can do!