Hacker News new | past | comments | ask | show | jobs | submit login

How would that work? The problem here is that chroot needs to run using a different CPU instruction set. qemu-user is exactly the right answer here.

According to e.g. https://wiki.gentoo.org/wiki/Systemd-nspawn "no hardware emulation is taking place and unlike QEMU and Virtualbox non-native CPU instruction sets are not directly supported".




systemd-nspawn is still using binfmt which is how Linux tries to read ELF files, and what you really want when executing other architectures is to teach binfmt about qemu.

nspawn doesn't do anything additional here, but might be easier for most new sysadmins (sorry... "devops/platform/cloud engineers").

More info (from 2016 so it could be out of date): https://blog.oddbit.com/post/2016-02-07-systemd-nspawn-for-f...


cd into an OS image built for arm on your x86 dev machine, and type:

`systemd-nspawn -D .`

and it just works. At least it's never failed for me. I believe it pulls in some kind of binfmt/qemu shim to get these binaries working. Probably qemu under the hood, but this is about as plug-n-play as it gets.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: