From 0a40e8eab58c8823c1560cc521c92fbdfaeafba0 Mon Sep 17 00:00:00 2001 From: Derumier Alexandre Date: Mon, 3 Oct 2011 14:53:10 +0200 Subject: [PATCH] fix watchdog pci addr Signed-off-by: Derumier Alexandre --- PVE/QemuServer.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index e7a053b1..30ccb41a 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2104,7 +2104,9 @@ sub config_to_command { if ($conf->{watchdog}) { my $wdopts = parse_watchdog($conf->{watchdog}); - push @$cmd, '-watchdog', $wdopts->{model} || 'i6300esb'; + $pciaddr = print_pci_addr("watchdog"); + my $watchdog = $wdopts->{model} || 'i6300esb'; + push @$cmd, '-device', "$watchdog$pciaddr"; push @$cmd, '-watchdog-action', $wdopts->{action} if $wdopts->{action}; } @@ -2801,6 +2803,7 @@ sub print_pci_addr { my $res = ''; my $devices = { balloon0 => { bus => 0, addr => 3 }, + watchdog => { bus => 0, addr => 4 }, virtio0 => { bus => 0, addr => 10 }, virtio1 => { bus => 0, addr => 11 }, virtio2 => { bus => 0, addr => 12 },