diff options
Diffstat (limited to 'src/qemu.sh')
-rwxr-xr-x | src/qemu.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/qemu.sh b/src/qemu.sh new file mode 100755 index 0000000..dfed521 --- /dev/null +++ b/src/qemu.sh | |||
@@ -0,0 +1,34 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | . samizdat-path.sh | ||
4 | |||
5 | # iso=debian-live-8.4.0-amd64-gnome-desktop.iso | ||
6 | # iso=debian-live-8.4.0-amd64-standard.iso | ||
7 | # iso=debian-live-8.4.0-amd64-standard.btrfs.iso | ||
8 | iso=${samizdat_iso_dir}/samizdat.iso | ||
9 | disk=${samizdat_iso_dir}/debian-live-8.4.0-amd64-standard.btrfs.disk | ||
10 | layered=${samizdat_iso_dir}/${iso%.iso}.layered.iso | ||
11 | |||
12 | [ -f "$layered" ] && iso=$layered | ||
13 | |||
14 | [ "$1" ] && iso=$1 | ||
15 | |||
16 | initrd.sh || { echo "initrd.sh failed" >&2; exit 1; }; | ||
17 | |||
18 | NET='tap,vlan=0,ifname=tap0,script=no,downscript=no' | ||
19 | |||
20 | # To test local pxe boot server: | ||
21 | # NET='user,tftp=isolinux,bootfile=/pxelinux.0' | ||
22 | |||
23 | initrd=${samizdat_isolinux_dir}/linux/initrd.img | ||
24 | kernel=${samizdat_isolinux_dir}/linux/vmlinuz | ||
25 | kcmdline='boot=samizdat components quiet splash' | ||
26 | |||
27 | sudo qemu-system-x86_64 -enable-kvm -smp 2 -m 640 -k en-us \ | ||
28 | -vga qxl \ | ||
29 | -net nic,vlan=0,model=virtio \ | ||
30 | -net "$NET" \ | ||
31 | -rtc base=localtime \ | ||
32 | -cdrom "$iso" \ | ||
33 | -hda "$disk" \ | ||
34 | -initrd "$initrd" -kernel "$kernel" -append "$kcmdline" | ||