Advertisement
teknoraver

kvm

Dec 2nd, 2017 (edited)
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.54 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. dir=~/vm
  4.  
  5. exec qemu-system-x86_64 -nographic -nodefaults -machine q35,accel=kvm -m 256 \
  6.     -drive "file=$dir/debian64.img,media=disk,format=raw,if=virtio" \
  7.     -netdev user,id=hostnet0 \
  8.     -chardev stdio,signal=off,id=channel0,mux=on \
  9.     -mon chardev=channel0 \
  10.     -device virtio-net-pci,netdev=hostnet0 \
  11.     -device virtio-serial-pci,id=virtio-serial0 \
  12.     -device virtconsole,bus=virtio-serial0.0,chardev=channel0 \
  13.     -virtfs local,path=$HOME,mount_tag=home,security_model=passthrough \
  14.     -append 'ro root=/dev/vda1 console=hvc0' -kernel "$@"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement