Advertisement
allan

ntp Linux under MacOS qemu

Apr 25th, 2022
1,043
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.10 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # Working under Big Sur
  4. # MacPorts QEMU 6.2.0 start script for Linux ntp server running under MacOS with
  5. # - USB GPS Prolific PL2303 device passthru into guest
  6. # - qemu-guest-agent
  7. # - socket QEMU control
  8.  
  9. /opt/local/bin/qemu-system-x86_64 -no-user-config -display none \
  10.  -name ticktock -machine q35 -m size=512 \
  11.  -cpu host -accel hvf -usb -smp 2 \
  12.  -drive file=/Users/server/Virtual\ Machines/ticktock.qcow2,if=virtio \
  13.  -nic user,model=e1000,id=net0,hostfwd=tcp::2222-:22,hostfwd=udp::123-:123 \
  14.  -device usb-host,vendorid=0x067b,productid=0x2303 \
  15.  -chardev socket,path=/tmp/qga.sock,server=on,wait=off,id=qga0 \
  16.  -device virtio-serial \
  17.  -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 \
  18.  -monitor unix:/var/run/qemu-ticktock.socket,server=on,wait=off
  19.  
  20. # To boot into install .iso
  21. #
  22. # -cdrom ${HOME}/Downloads/debian-11.3.0-amd64-netinst.iso
  23.  
  24. # To access qemu console for system_powerdown
  25. # Ref: https://unix.stackexchange.com/questions/426652/connect-to-running-qemu-instance-with-qemu-monitor
  26. #
  27. # socat -,echo=0,icanon=0 unix-connect:/var/run/qemu-ticktock.socket
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement