Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Trivial script to spin up a Debian MIPS|PPC|arm|x86|x64 VM (gist.github.com)
34 points by cellularmitosis on Sept 1, 2020 | hide | past | favorite | 11 comments


I've worked on something similar using libvirt, kvm, and qemu. Maybe I'll clean it up and share it here later this week.

The script uses libvirt to automate the process of creating a new kvm VM, and emulates CPU architecture via qemu (arm, aarch64, ppc, risc, etc).

The VMs run pretty nicely on Debian - including insane boot times and direct kernel boot.

I'm not sure if MacOS supports kvm or not. A quick google search yields results to emulate MacOS, though :)


If you do (which would be great), please consider adding it to this list:

https://wiki.debian.org/SystemBuildTools


While this is in no doubt very useful, it (as you note) re-uses pre-built images that are unfortunately ancient (2013).

The real jackpot still remains out there: a tool with which to actually create those images. Having that would be awesome.

I use tool like vmdb2 to generate entirely new Debian VM images in under three minutes: I have more than a dozen images for my regular Debian development needs (various distributions, various specializations such as buildd-specific environments, etc.).

However, unfortunately vmdb2 only supports i386 and amd64 so far.

There are a ton of tools for automatically building Debian systems [1], some of which can generate bootable images, however they all seem to focus on i386/amd64.

Fully Automated Installation (FAI) in combination with your gist could be something that works. FAI is used to generate most of the Debian images for the cloud providers. So most of the tooling should already be in place.

If you get that to run, I can't say that you will make a lot of people happy, but you will definitely make a few people very very happy :-)

[1] https://wiki.debian.org/SystemBuildTools


I have a similar thing with weekly updated images (from Debian unstable) and more supported archs here: https://people.debian.org/~gio/dqib/.


This is exactly what I as looking for! I wasn't aware of DQIB. Thanks!


Good! Mind you, they are not high quality images. They're just a raw mmdebstrap with little configuration, probably not suitable for production use. I mean them for development. (I specify this because you mentioned tool for actual production use).

In any case, help yourself!


That's exactly my use case: I use these images for (1) building packages locally (sbuild has a QEMU bridge via the autopkgtest mode), and (2) for autopkgtest.

A minimal debootstrap-like installation with only the bare minimum configuration is ideal for that, it ensures that nothing from my own environment bleeds into the build/test environment.

I've run into all sorts of issues on non-amd64 platforms, and debugging on porter boxes is sometimes cumbersome. Most importantly, however, is getting access to one. For Debian contributors, it's easy, but most upstreams aren't Debian contributors.

Unless I'm mistaken, I can now at least point them to one of the images you generate, and they should be able to run it with very little effort.


For some usecases you can even use docker for lightweight chroots for ARM, MIPS, POWER8 etc. At least for me it covers a lot of grounds (eg. developing for my RPi on my x86 laptop, recompiling a kernel for my ARM-based HTPC etc.)

See https://benou.fr/www/ben/using-docker-as-chroot-on-steroids....

I just checked for Debian 10 for mips64le, ppc64le and arm64v8 targets.


Hi HN, I found a series of Debian QEMU images and wrote a script around them. This solves the need of “I need a MIPS box but don’t have time to install Debian from scratch”.


I should add a note to the script: root passwd is root and a “user” account exists with passwd “user”


Hello again HN, an update: I added OS detection (apt-get vs brew), and also set up port-forwarding for port 22. Cheers!




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: