* [Qemu-devel] how to setup a watchdog?
@ 2016-01-18 11:43 lejeczek
2016-01-20 6:37 ` Philipp Hahn
2016-01-30 11:42 ` Richard W.M. Jones
0 siblings, 2 replies; 3+ messages in thread
From: lejeczek @ 2016-01-18 11:43 UTC (permalink / raw)
To: qemu-devel qemu-devel
apologies I bother devel, but..
I tried to get help on libvirt mailing list but not luck,
then qemu, still nothing
I hope maybe somebody here?
I'm trying Qemu's watchdog.
My understanding was that hardware (here qemu's watchdog)
would take
action, eg. cold reboot the system if there is no ping from
the OS watchdog, so I
thought stopping watchdog service in VM should be a quick
test, right?
I have this in the guest:
<watchdog model='i6300esb' action='reset'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x08' function='0x0'/>
</watchdog>
and I see /dev/watchdog in my guest. Yet nothing happens,
guest(linux) runs uninterrupted.
I must be missing something, an expert said it's config
problem, is it really is?
many thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] how to setup a watchdog?
2016-01-18 11:43 [Qemu-devel] how to setup a watchdog? lejeczek
@ 2016-01-20 6:37 ` Philipp Hahn
2016-01-30 11:42 ` Richard W.M. Jones
1 sibling, 0 replies; 3+ messages in thread
From: Philipp Hahn @ 2016-01-20 6:37 UTC (permalink / raw)
To: lejeczek, qemu-devel qemu-devel
Hi,
Am 18.01.2016 um 12:43 schrieb lejeczek:
> I'm trying Qemu's watchdog.
> My understanding was that hardware (here qemu's watchdog) would take
> action, eg. cold reboot the system if there is no ping from the OS
> watchdog, so I
> thought stopping watchdog service in VM should be a quick test, right?
>
> I have this in the guest:
>
> <watchdog model='i6300esb' action='reset'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
> </watchdog>
>
> and I see /dev/watchdog in my guest. Yet nothing happens, guest(linux)
> runs uninterrupted.
> I must be missing something, an expert said it's config problem, is it
> really is?
Probably reading linux/Documentation/watchdog/watchdog-api.txt should
give you some extra hints.
AFAIK you need to open that device file at least once, either with the
sample program included in the Linux source tree, or by another program
like (Debian) watchdog or systemd (man 5 systemd-system.conf ->
RuntimeWatchdogSec)
cat /dev/watchdog # will print an error about the read(), but the
important thing (opening the file) has been done
dmesg | grep watchdog # will print "i6300esb: Unexpected close, not
stopping watchdog!" to show you that the watchdog is still running and
will trigger the reboot, as it has gone through the shutdown protocol,
which can be used to disable the watchdog again
After ~1m my test VM rebooted.
Philipp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] how to setup a watchdog?
2016-01-18 11:43 [Qemu-devel] how to setup a watchdog? lejeczek
2016-01-20 6:37 ` Philipp Hahn
@ 2016-01-30 11:42 ` Richard W.M. Jones
1 sibling, 0 replies; 3+ messages in thread
From: Richard W.M. Jones @ 2016-01-30 11:42 UTC (permalink / raw)
To: lejeczek; +Cc: qemu-devel qemu-devel
On Mon, Jan 18, 2016 at 11:43:02AM +0000, lejeczek wrote:
> apologies I bother devel, but..
> I tried to get help on libvirt mailing list but not luck, then qemu,
> still nothing
> I hope maybe somebody here?
>
> I'm trying Qemu's watchdog.
> My understanding was that hardware (here qemu's watchdog) would take
> action, eg. cold reboot the system if there is no ping from the OS
> watchdog, so I
> thought stopping watchdog service in VM should be a quick test,
> right?
>
> I have this in the guest:
>
> <watchdog model='i6300esb' action='reset'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x08'
> function='0x0'/>
> </watchdog>
>
> and I see /dev/watchdog in my guest. Yet nothing happens,
> guest(linux) runs uninterrupted.
> I must be missing something, an expert said it's config problem, is
> it really is?
Sorry for the late response.
If your guest is Linux, you must also run the watchdog daemon in the
guest. The watchdog device's timer isn't primed until it is opened
and set up by the watchdog daemon.
There is basically no watchdog framework or support in Windows, so
you'll have to write the software and driver yourself.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-30 11:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-18 11:43 [Qemu-devel] how to setup a watchdog? lejeczek
2016-01-20 6:37 ` Philipp Hahn
2016-01-30 11:42 ` Richard W.M. Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).