save
This commit is contained in:
parent
5737f5ee50
commit
8789922ba6
1 changed files with 0 additions and 27 deletions
27
bin/vm
27
bin/vm
|
|
@ -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
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue