eth0s/run_qemu

21 lines
464 B
Text
Raw Permalink Normal View History

2020-06-28 23:38:04 +08:00
#!/bin/sh
2021-04-18 08:19:42 +08:00
[ -f lfs-scripts.qcow2 ] || {
qemu-img create -f qcow2 lfs-scripts.qcow2 50G
2020-06-28 23:38:04 +08:00
}
exec qemu-system-x86_64 -enable-kvm \
-cpu host \
2021-04-18 08:19:42 +08:00
-drive file=lfs-scripts.qcow2,if=virtio \
-netdev user,id=vmnic,hostname=LFS \
2020-06-28 23:38:04 +08:00
-device virtio-net,netdev=vmnic \
-device virtio-rng-pci \
-m 2G \
-smp 4 \
-monitor stdio \
2021-04-18 08:19:42 +08:00
-name "LFS VM" \
2020-06-28 23:38:04 +08:00
-boot d \
-cdrom $@
2021-04-18 08:19:42 +08:00
rm -f lfs-scripts.qcow2