[pve-devel] [PATCH 09/11] add watchdog device and watchdog option

Dietmar Maurer dietmar at proxmox.com
Thu Sep 8 09:32:08 CEST 2011


> new vm config values :
> 
> watchdog: i6300esb (default) / ib700
> watchdogaction: reset (default)/shutdown/poweroff/pause/debug/none

can we merge that into one option?

watchdog:  (i6300esb|ib700)[,action=reset/shutdown/poweroff/pause/debug/none]

Or is there a reason to keep 2 options?

- Dietmar

> 
> Signed-off-by: Derumier Alexandre <aderumier at odiso.com>
> ---
>  PVE/QemuServer.pm |   16 ++++++++++++++++
>  1 files changed, 16 insertions(+), 0 deletions(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index a6ef452..5cce444
> 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -286,6 +286,16 @@ EODESC
>  	description => "Select VGA type. If you want to use high resolution
> modes (>= 1280x1024x16) then you should use option 'std' or 'vmware'. Default
> is 'std' for win7/w2k8, and 'cirrur' for other OS types",
>  	enum => [qw(std cirrus vmware)],
>      },
> +    watchdog => {
> +        optional => 1,
> +        type => 'string',
> +        description => "Watchdog model (i6300esb/ib700)",
> +    },
> +    watchdogaction => {
> +        optional => 1,
> +        type => 'string',
> +        description => "Action on watchdog event
> reset/shutdown/poweroff/pause/debug/none",
> +    },
>      hostpci => {
>  	optional => 1,
>          type => 'string', format => 'pve-qm-hostpci', @@ -2027,6 +2037,12 @@
> sub config_to_command {
>      my $kb = $conf->{keyboard} || $defaults->{keyboard};
>      push @$cmd, '-k', $kb if $kb;
> 
> +    # enable watchdog device
> +    my $watchdog = $conf->{watchdog} || $defaults->{watchdog};
> +    push @$cmd, '-device', $watchdog.',id=watchdog0' if $watchdog;
> +    my $watchdogaction = $conf->{watchdogaction} || $defaults-
> >{watchdogaction};
> +    push @$cmd, '-watchdog-action', $watchdogaction if $watchdogaction;
> +
>      # enable sound
>      my $soundhw = $conf->{soundhw} || $defaults->{soundhw};
>      push @$cmd, '-device', $soundhw.',id=sound0' if $soundhw;
> --
> 1.7.2.5
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel





More information about the pve-devel mailing list