TEXT   19

Boot guest patch

Guest on 3rd June 2022 01:30:42 AM

  1. --- 4-boot-guest.sh     2022-12-15 22:56:31.000000000 +0000
  2. +++ 4-boot-guest-new.sh 2022-12-17 05:34:14.000000000 +0000
  3. @@ -41,14 +41,26 @@
  4.  
  5.  /usr/sbin/bhyvectl --vm=guest$GUESTID --destroy > /dev/null 2>&1
  6.  
  7. -/usr/sbin/bhyveload -m $GUESTRAM -M 0 -d $BOOTDEV guest$GUESTID
  8. -
  9. -/usr/sbin/bhyve -c $NUMCPUS -a -A -m $GUESTRAM -M 0 -I -H -g 0 \
  10. --s 0:0,hostbridge \
  11. --s 1:0,virtio-net,tap$GUESTID \
  12. --s 2:0,virtio-blk,$BOOTDEV \
  13. --S 31,uart,stdio \
  14. -guest$GUESTID
  15. +if [ $GUESTRAM -gt 2048 ]; then
  16. +       RESTRAM=`expr $GUESTRAM - 2048`
  17. +       /usr/sbin/bhyveload -m 2048 -M $RESTRAM -d $BOOTDEV guest$GUESTID
  18. +
  19. +       /usr/sbin/bhyve -c $NUMCPUS -a -A -m 2048 -M $RESTRAM -I -H -g 0 \
  20. +       -s 0:0,hostbridge \
  21. +       -s 1:0,virtio-net,tap$GUESTID \
  22. +       -s 2:0,virtio-blk,$BOOTDEV \
  23. +       -S 31,uart,stdio \
  24. +       guest$GUESTID
  25. +else
  26. +       /usr/sbin/bhyveload -m $GUESTRAM -M 0 -d $BOOTDEV guest$GUESTID
  27. +
  28. +       /usr/sbin/bhyve -c $NUMCPUS -a -A -m $GUESTRAM -M 0 -I -H -g 0 \
  29. +       -s 0:0,hostbridge \
  30. +       -s 1:0,virtio-net,tap$GUESTID \
  31. +       -s 2:0,virtio-blk,$BOOTDEV \
  32. +       -S 31,uart,stdio \
  33. +       guest$GUESTID
  34. +fi
  35.  
  36.  # Role of bhyve -b : probe bhyve console, not needed for unmodified
  37.  # -P not needed

Raw Paste


Login or Register to edit or fork this paste. It's free.