#!/bin/sh bit64=false kvm="`grep -q ' \(svm\|vmx\)' /proc/cpuinfo && echo '--enable-kvm'`" if "$bit64"; then wget 'https://cdimage.debian.org/cdimage/ports/latest/hurd-amd64/debian-hurd.img.tar.gz' else wget 'https://cdimage.debian.org/cdimage/ports/latest/hurd-i386/debian-hurd.img.tar.gz' fi image="`tar -xvzf debian-hurd.img.tar.gz`" # I think 32bit code should work even if we run x86_64 qemu? # For now 64bit Hurd seems to require -M q35 to run in qemu qemu-system-x86_64 ${kvm} -m 2G -M q35 -drive cache=writeback,file="$image" -net user,hostfwd=tcp:127.0.0.1:2222-:22 -net nic,model=e1000