-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathqemu-run.sh
executable file
·22 lines (18 loc) · 1.11 KB
/
qemu-run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
if [ "$#" != 1 ]; then
echo "usage: $0 <path/to/image/dir>"
exit 1
fi
IMAGE_DIR="$1"
qemu-system-x86_64 \
-m 1G \
-M pc \
-cpu qemu64 \
-kernel ${IMAGE_DIR}/bzImage \
-drive file="${IMAGE_DIR}"/rootfs.ext2,if=virtio,format=raw \
-append "rw nokaslr panic=1 root=/dev/vda console=tty1 console=ttyS0" \
-no-reboot \
-nographic \
-serial mon:stdio \
-s \
-net nic,model=virtio -net user