Ok so I came up with a workaround that seems to be working for me. The guests shutdown completely. Not sure what this breaks if anything. There still needs to be a permanent fix for this bug but here is what I did.
(1)
Edit /etc/init/libvirt-bin.conf
I added this under the "pre-start script" section.
pre-stop script /etc/init.d/kvmguests stop
end script
(2)
Edit /etc/init.d/sendsigs
Search in /etc/init.d/sendsigs for "do_stop () {" and add these lines right below it.
kvm_shutdown_timeout=30
while /bin/ls /var/run/libvirt/qemu/*.pid>/dev/null 2>&1 && [ $kvm_shutdown_timeout -gt 0 ]
do
sleep 1 kvm_shutdown_timeout=$(expr $kvm_shutdown_timeout - 1)
done
(3)
Create sys-v init script kvmguests and put it in /etc/init.d and make it executable.
Here is mine attached to this post. It can also be used to manually stop the guests.
**Notes: The kvm_shutdown_timeout=30 in /etc/init.d/sendsigs can be tuned to your environment.
Ok so I came up with a workaround that seems to be working for me. The guests shutdown completely. Not sure what this breaks if anything. There still needs to be a permanent fix for this bug but here is what I did.
(1) libvirt- bin.conf
Edit /etc/init/
I added this under the "pre-start script" section.
pre-stop script
/etc/init. d/kvmguests stop
end script
(2) d/sendsigs
Edit /etc/init.
Search in /etc/init. d/sendsigs for "do_stop () {" and add these lines right below it.
kvm_shutdown_ timeout= 30 libvirt/ qemu/*. pid>/dev/ null 2>&1 && [ $kvm_shutdown_ timeout -gt 0 ]
kvm_shutdown_ timeout= $(expr $kvm_shutdown_ timeout - 1)
while /bin/ls /var/run/
do
sleep 1
done
(3)
Create sys-v init script kvmguests and put it in /etc/init.d and make it executable.
Here is mine attached to this post. It can also be used to manually stop the guests.
**Notes: The kvm_shutdown_ timeout= 30 in /etc/init. d/sendsigs can be tuned to your environment.