]> git.proxmox.com Git - qemu-server.git/commitdiff
fix watchdog pci addr
authorDerumier Alexandre <aderumier@odiso.com>
Mon, 3 Oct 2011 12:53:10 +0000 (14:53 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 4 Oct 2011 05:54:21 +0000 (07:54 +0200)
Signed-off-by: Derumier Alexandre <aderumier@odiso.com>
PVE/QemuServer.pm

index e7a053b1a3e3b8fecca566082ac321091842714f..30ccb41ae06401c3c9c0491c3c90ae9d00329dde 100644 (file)
@@ -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 },