Support QEMU watchdog device.

This adds simple support for configuring a guest with a QEMU/KVM
virtual hardware watchdog device.
This commit is contained in:
Richard Jones
2009-10-21 13:26:38 +01:00
parent b03fe2d0ae
commit 08bed02515
9 changed files with 342 additions and 10 deletions

View File

@@ -212,6 +212,7 @@ mymain(int argc, char **argv)
DO_TEST("parallel-tcp", 0);
DO_TEST("console-compat", 0);
DO_TEST("sound", 0);
DO_TEST("watchdog", 0);
DO_TEST("hostdev-usb-product", 0);
DO_TEST("hostdev-usb-address", 0);

View File

@@ -0,0 +1 @@
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -watchdog ib700 -watchdog-action poweroff

View File

@@ -0,0 +1,23 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory>219200</memory>
<currentMemory>219200</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
</disk>
<watchdog model='ib700' action='poweroff'/>
</devices>
</domain>