This commit is contained in:
Artur Gurgul1 2025-08-10 20:12:10 +02:00
parent 5737f5ee50
commit 8789922ba6

27
bin/vm
View file

@ -1,27 +0,0 @@
# mount -t 9p -o trans=virtio,version=9p2000.L share /home/user
# this add to brake and inspect /dev if /dev/sda1 not found
# -append "root=/dev/sda1 console=ttyS0 rd.break"
function run {
qemu-system-x86_64 -append "root=/dev/sda1 console=ttyS0 rd.break" \
-kernel "vmlinuz-linux" \
-initrd "initramfs-linux.img" \
-m 2048 \
-smp $(sysctl -n hw.logicalcpu) \
-cpu qemu64 \
-virtfs local,path=.,security_model=none,mount_tag=share \
-drive id=root-disk,if=none,format=raw,file=linux.img \
-device ide-hd,bus=ide.0,drive=root-disk \
-drive id=data-disk,if=none,format=qcow2,file=dat.qcow2 \
-device ide-hd,bus=ide.1,drive=data-disk \
-nographic
}
function reset {
qemu-img create -f qcow2 dat.qcow2 32G
}
$1