20 lines
464 B
Bash
Executable file
20 lines
464 B
Bash
Executable file
#!/bin/sh
|
|
|
|
[ -f lfs-scripts.qcow2 ] || {
|
|
qemu-img create -f qcow2 lfs-scripts.qcow2 50G
|
|
}
|
|
|
|
exec qemu-system-x86_64 -enable-kvm \
|
|
-cpu host \
|
|
-drive file=lfs-scripts.qcow2,if=virtio \
|
|
-netdev user,id=vmnic,hostname=LFS \
|
|
-device virtio-net,netdev=vmnic \
|
|
-device virtio-rng-pci \
|
|
-m 2G \
|
|
-smp 4 \
|
|
-monitor stdio \
|
|
-name "LFS VM" \
|
|
-boot d \
|
|
-cdrom $@
|
|
|
|
rm -f lfs-scripts.qcow2
|