News for hackers. Stuff that matters.
Re:My VM is lighter (and safer) than your container (2017) by bongobingo1 on Thursday September 08, 2022 @11:07AM (#32766691)
I'm quite interested in seeing where slim VM's go. Personally I don't use Kubernetes, it just doesn't fit my client work which is nearly all single-server and it makes more sense to just run podman systemd units or docker-compose setups.

So from that perspective, when I've peeked at firecracker, kata containers, etc, the "small dev dx" isn't quite there yet, or maybe never will get there since the players target other spaces (aws, fly.io, etc). Stuff like a way to share volumes isn't supported, etc. Personally I find Dockers architecture a bit distasteful and Podmans tooling isn't quite there yet (but very close).

Honestly I don't really care about containers vs VMs except the VM alleges better security which is nice, and I guess I like poking at things but they're were a little too rough for weekend poking.

Is anyone doing "small scale" lightweight vm deployments - maybe just in your homelab or toy projects? Have you found the experience better than containers?

Re:My VM is lighter (and safer) than your container (2017) by depingus on Thursday September 08, 2022 @01:44PM (#32769002)
> So from that perspective, when I've peeked at firecracker, kata containers, etc, the "small dev dx" isn't quite there yet, or maybe never will get there since the players target other spaces (aws, fly.io, etc). Stuff like a way to share volumes isn't supported, etc. Personally I find Dockers architecture a bit distasteful and Podmans tooling isn't quite there yet (but very close).

This is pretty much me and my homelab. I haven't visited it in a while, but Weave Ignite might be of interest here. https://github.com/weaveworks/ignite

Re:My VM is lighter (and safer) than your container (2017) by xani_ on Thursday September 08, 2022 @11:52AM (#32767383)
They went to trash because containers are more convenient to use and saving few MBs of disk/memory is not what most users care.

The whole idea was pretty much either use custom kernel (which inevitably have way less info on how to debug anything in it), and re-do all of the network and storage plumbing containers already do via the OS they are running one.

OR just very slim linux one which at least people know how to use but STILL is more complexity than "just a blob with some namespaces in it" and STILL requires a bunch of config and data juggling between hypervisor and VM just to share some host files to the guest.

Either way to get to the level of "just a slim layer of code between hypervisor and your code" you need to do a quite a lot of deep plumbing and when anything goes wrong debugging is harder. All to get some perceived security and no better performance than just... running the binary in a container.

It did percolate into "slim containers" idea where the container is just statically compiled binary + few configs and while it does have same problems with debuggability, you can just attach sidecart to it

I guess next big hype will be "VM bUt YoU RuN WebAsSeMbLy In CuStOm KeRnEl"

Re:My VM is lighter (and safer) than your container (2017) by evol262 on Thursday September 08, 2022 @12:51PM (#32768228)
Virtualization is not just "perceived" security over containerization. From CPU rings on down, it offers dramatically more isolation for security than containerization does.

This isn't about 'what most users care' about either. Most users don't really care about 99% of what container orchestration platforms offer. The providers do absolutely care that malicious users cannot punch out to get a shell on an Azure AKS controller or go digging around inside /proc to figure out what other tenants are doing unless the provider is on top of their configuration and regularly updates to match CVEs.

"most users" will end up using one of the frameworks written by a "big boy" for their stuff, and they'll end up using what's convenient for cloud providers.

The goal of microvms is ultimately to remove everything you're talking about from the equation. Kata and other microvm frameworks aim to be basically jsut another CRI which removes the "deep plumbing" you're talking about. The onus is on them to make this work, but there's an enormous financial payoff, and you'll end up with this whether you think it's worthwhile or not.

Re:My VM is lighter (and safer) than your container (2017) by fpoling on Thursday September 08, 2022 @10:23PM (#32774567)
Running a VM is not necessary more secure than running a container. By definition VM allows to run an untrusted kernel code which makes exploiting curtain bugs more feasible. This is especially so with hardware bugs.

What is fundamentally more secure is running applications inside a VM which is what Amazon is doing. The attacker then has to first exploit the kernel before trying to escape the hypervisor.

Re:My VM is lighter (and safer) than your container (2017) by convolvatron on Thursday September 08, 2022 @12:55PM (#32768282)
in a related vein, most of the distinctions that are being brought up around containers vs vms (pricing, debugability, tooling, overhead) are nothing fundamental at all. they are both executable formats that cut at different layers, and there is really no reason why features of one can't be easily brought to the other.

operating above these abstractions can save us time, but please stop confusing the artifacts of implementation with some kind of fundamental truth. its really hindering our progress.

Re:My VM is lighter (and safer) than your container (2017) by galangalalgol on Thursday September 08, 2022 @09:24PM (#32774203)
How would you compare the security of running in wasmer vs the other two options. I know it is a bit apples and oranges. Just curious if it would be harder to break out of a wasm sandbox, or a vm.
Re:My VM is lighter (and safer) than your container (2017) by evol262 on Thursday September 08, 2022 @04:38PM (#32771765)
Bringing the features of one to the other is exactly what microvms means.
Re:My VM is lighter (and safer) than your container (2017) by pojzon on Thursday September 08, 2022 @03:56PM (#32771176)
With eBPF there is really not much to argue about in security space.

You can do everything.

New toolset for containers covers pretty much every possible use-case you could even imagine.

The trend will continue in favor of containers and k8s.

Re:My VM is lighter (and safer) than your container (2017) by staticassertion on Thursday September 08, 2022 @04:49PM (#32771907)
I'm not sure what you mean with regards to eBPF but the difference between a container and a VM is massive with regards to security. Incidentally, my company just published a writeup about Firecracker: https://news.ycombinator.com/item?id=32767784
Re:My VM is lighter (and safer) than your container (2017) by evol262 on Thursday September 08, 2022 @04:46PM (#32771860)
Let me know when eBPF can probe into ring-1 hypercalls into a different kernel other than generically watching timing from vm_enter and vm_exit.

Yes, there is a difference between "eBPF can probe what is happening in L0 of the host kernel" and "you can probe what is happening in other kernels in privileged ring-1 calls".

No, this is not what you think it is.

Re:My VM is lighter (and safer) than your container (2017) by tptacek on Thursday September 08, 2022 @05:08PM (#32772107)
It is pretty obviously not the case that eBPF means shared-kernel containers are comparably as secure as VMs; there have been recent Linux kernel LPEs that no system call scrubbing BPF code would have caught, without specifically knowing about the bug first.
Re:My VM is lighter (and safer) than your container (2017) by pjmlp on Friday September 09, 2022 @03:59AM (#32776585)
Except stuff like Kata Containers exist exactly because containers alone is not enough.

WebAssembly on the cloud is only re-inventing what other bytecode based platforms have been doing for decades, but VC need ideas to invest into apparently.

Re:My VM is lighter (and safer) than your container (2017) by NorwegianDude on Thursday September 08, 2022 @03:23PM (#32770704)
I've been using containers since 2007 for isolating workloads. I don't really like Docker for production either because of the network overhead with the "docker-way" of doing things.

LXD is definetly my favorite container tool.

Re:My VM is lighter (and safer) than your container (2017) by indigodaddy on Thursday September 08, 2022 @11:44PM (#32775068)
Re:My VM is lighter (and safer) than your container (2017) by pojzon on Thursday September 08, 2022 @04:07PM (#32771333)
How differently LXD manages isolation in comparison to docker ?

I suppose both create netns, bridge, ifs ?

Re:My VM is lighter (and safer) than your container (2017) by antod on Thursday September 08, 2022 @05:41PM (#32772454)
LXC/LXD use the same kernel isolation/security features Docker does - namespaces, cgroups, capabilities etc.

After all, it is the kernel functionality lets you run something as a container. Docker and LXC/LXD are different management / FS packaging layers on top of that.

Re:My VM is lighter (and safer) than your container (2017) by staticassertion on Thursday September 08, 2022 @05:42PM (#32772471)
I assume it's not using seccomp, which Docker uses, although seccomp is not Docker specific and you can go grab their policy.
Re:My VM is lighter (and safer) than your container (2017) by lstodd on Thursday September 08, 2022 @05:33PM (#32772375)
It's the same stuff - namespaces, etc. But it doesn't shove greasy fingers into network config like docker. More a tooling question/approach than tech.
Re:My VM is lighter (and safer) than your container (2017) by zonethundery on Friday September 09, 2022 @08:45AM (#32778443)
Have similar feelings about docker. LXD containers through a bridged interface fit my mental model/use case.
Re:My VM is lighter (and safer) than your container (2017) by stavros on Thursday September 08, 2022 @08:44PM (#32773992)
I was in the same boat as you and built something simple that I really like:

https://gitlab.com/stavros/harbormaster

It'll just pull some repos, make sure the containers are up, and make your configuration simple and discoverable. It really works great at that.

Re:My VM is lighter (and safer) than your container (2017) by gaocegege on Friday September 09, 2022 @12:25AM (#32775282)
I do not think Docker is the end game. Firecracker/kata containers neither.

https://github.com/tensorchord/envd is my favorite container tool. It provides the build language based on Python and the build is optimized for this scenario.

There may be more runtime and image build tools for both containers and VMs. And different tools may be designed for different purposes. That's the future I believe.