| 1 | #!/bin/bash |
| 2 | |
| 3 | DISK=emulation/debian2.img |
| 4 | BZIMAGE=linux-kernel/arch/x86/boot/bzImage |
| 5 | SHARE=/home/user/share |
| 6 | |
| 7 | sudo qemu-system-x86_64 \ |
| 8 | -device virtio-balloon \ |
| 9 | -enable-kvm \ |
| 10 | -accel kvm \ |
| 11 | -kernel ${BZIMAGE} \ |
| 12 | -append 'console=ttyS0 root=/dev/vda1 pci=noacpi' \ |
| 13 | -drive file=${DISK},if=virtio,cache=writeback \ |
| 14 | -virtfs local,path=${SHARE},security_model=passthrough,mount_tag=k1 \ |
| 15 | -nic tap,ifname=tap0,script=no,downscript=no,model=virtio-net-pci \ |
| 16 | -display none \ |
| 17 | -nographic \ |
| 18 | -serial mon:stdio \ |
| 19 | -m 2048 -boot c \ |
| 20 | -snapshot -s |