grehan-freebsd / grub2-bhyve

GNU General Public License v3.0
51 stars 21 forks source link

hangs with 100 % CPU when started at reboot #7

Open rfc2822 opened 7 years ago

rfc2822 commented 7 years ago

FreeBSD 11 / grub2-bhyve-0.40

When I start grub-bhyve manually over SSH, everything works. As soon as it's started from cron at @reboot, it hangs with 100 % CPU. I even can't reproduce the problem without rebooting the server every time, as it also works for env -i grub2-bhyve …

My current start script, loaded by cron at @reboot:

#!/usr/local/bin/bash
export PATH=/usr/local/sbin:/usr/sbin:/usr/bin:/bin

bhyvectl --destroy --vm=ubuntu

# make the environment look interactive
export TERM="vt100"
(while [ 1 ]; do sleep 1; echo -e "\\n"; done) | grub-bhyve -v -m device.map -r hd0,msdos1 -M 10240M ubuntu >/dev/null 2>/dev/null

bhyve -AHPu -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 -s 3:0,virtio-blk,/dev/zvol/hdd/ubuntu -l com1,/dev/nmdm0A -c 4 -m 10240M ubuntu &

Do you have any idea what I could try or how to debug this problem?