1
2FENCE_AGENT(8)              System Manager's Manual             FENCE_AGENT(8)
3
4
5

NAME

7       fence_virsh - Fence agent for virsh
8

DESCRIPTION

10       fence_virsh  is an I/O Fencing agent which can be used with the virtual
11       machines managed by libvirt. It logs via ssh to a dom0  and  there  run
12       virsh command, which does all work.
13
14       By  default,  virsh needs root account to do properly work. So you must
15       allow ssh login in your sshd_config.
16
17       fence_virsh accepts options on the command line as well as from  stdin.
18       Fenced  sends  parameters  through  stdin  when  it  execs  the  agent.
19       fence_virsh can be run by itself with command line  options.   This  is
20       useful for testing and for turning outlets on or off from scripts.
21
22       Vendor URL: http://libvirt.org
23

PARAMETERS

25
26
27       -o, --action=[action]
28              Fencing action (Default Value: reboot)
29
30       -c, --command-prompt=[prompt]
31              Force  Python  regex  for command prompt (Default Value: ['\[EX‐
32              PECT\]#'])
33
34       -k, --identity-file=[filename]
35              Identity file (private key) for SSH
36
37       -4, --inet4-only
38              Forces agent to use IPv4 addresses only
39
40       -6, --inet6-only
41              Forces agent to use IPv6 addresses only
42
43       -a, --ip=[ip]
44              IP address or hostname of fencing device This parameter  is  al‐
45              ways required.
46
47       -u, --ipport=[port]
48              TCP/UDP  port  to use for connection with device (Default Value:
49              22)
50
51       -p, --password=[password]
52              Login password or passphrase
53
54       -S, --password-script=[script]
55              Script to run to retrieve password
56
57       -n, --plug=[id]
58              Physical plug number on device, UUID or  identification  of  ma‐
59              chine This parameter is always required.
60
61       -x, --ssh
62              Use SSH connection (Default Value: 1)
63
64       --ssh-options=[options]
65              SSH  options  to use (Default Value: -t '/bin/bash -c "PS1=\[EX‐
66              PECT\]# /bin/bash --noprofile --norc"')
67
68       -l, --username=[name]
69              Login name This parameter is always required.
70
71       -q, --quiet
72              Disable logging to stderr. Does not affect --verbose or --debug-
73              file or logging to syslog.
74
75       -v, --verbose
76              Verbose  mode.  Multiple  -v flags can be stacked on the command
77              line (e.g., -vvv) to increase verbosity.
78
79       --verbose-level
80              Level of debugging detail in output. Defaults to the  number  of
81              --verbose  flags  specified on the command line, or to 1 if ver‐
82              bose=1 in a  stonith  device  configuration  (i.e.,  on  stdin).
83
84
85       -D, --debug-file=[debugfile]
86              Write debug information to given file
87
88       -V, --version
89              Display version information and exit
90
91       -h, --help
92              Display help and exit
93
94       --plug-separator=[char]
95              Separator  for  plug  parameter when specifying more than 1 plug
96              (Default Value: ,)
97
98       -C, --separator=[char]
99              Separator for CSV created by 'list' operation (Default Value: ,)
100
101
102       --delay=[seconds]
103              Wait  X  seconds  before  fencing  is started (Default Value: 0)
104
105
106       --disable-timeout=[true/false]
107              Disable timeout (true/false) (default: true when run from  Pace‐
108              maker 2.0+)
109
110       --login-timeout=[seconds]
111              Wait  X  seconds  for  cmd prompt after login (Default Value: 5)
112
113
114       --missing-as-off
115              Missing port returns OFF instead of failure
116
117       --power-timeout=[seconds]
118              Test X seconds for status change after  ON/OFF  (Default  Value:
119              20)
120
121       --power-wait=[seconds]
122              Wait X seconds after issuing ON/OFF (Default Value: 0)
123
124       --shell-timeout=[seconds]
125              Wait  X  seconds  for  cmd prompt after issuing command (Default
126              Value: 3)
127
128       --stonith-status-sleep=[seconds]
129              Sleep X seconds between status calls  during  a  STONITH  action
130              (Default Value: 1)
131
132       --retry-on=[attempts]
133              Count  of  attempts  to  retry power on (Default Value: 1)
134
135
136       --use-sudo
137              Use sudo (without password)  when  calling  3rd  party  software
138
139
140       --ssh-path=[path]
141              Path to ssh binary (Default Value: /usr/bin/ssh)
142
143       --sudo-path=[path]
144              Path to sudo binary (Default Value: /usr/bin/sudo)
145
146

ACTIONS

148
149
150       on     Power on machine.
151
152       off    Power off machine.
153
154       reboot Reboot machine.
155
156       status This returns the status of the plug/virtual machine.
157
158       list   List  available  plugs with aliases/virtual machines if there is
159              support for more then one device. Returns N/A otherwise.
160
161       list-status
162              List available plugs with  aliases/virtual  machines  and  their
163              power  state  if it can be obtained without additional commands.
164
165
166       monitor
167              Check the health of fence device
168
169       metadata
170              Display the XML metadata describing this resource.
171
172       manpage
173               The operational behavior of this is not known.
174
175       validate-all
176              Validate if all required parameters are entered.
177
178

STDIN PARAMETERS

180
181
182       action Fencing action (Default Value: reboot)
183
184       command_prompt
185              Force Python regex for command prompt  (Default  Value:  ['\[EX‐
186              PECT\]#']) Obsoletes: cmd_prompt
187
188       identity_file
189              Identity file (private key) for SSH
190
191       inet4_only
192              Forces agent to use IPv4 addresses only
193
194       inet6_only
195              Forces agent to use IPv6 addresses only
196
197       ip     IP  address  or hostname of fencing device This parameter is al‐
198              ways required. Obsoletes: ipaddr
199
200       ipport TCP/UDP port to use for connection with device  (Default  Value:
201              22)
202
203       password
204              Login password or passphrase Obsoletes: passwd
205
206       password_script
207              Script  to  run  to  retrieve  password Obsoletes: passwd_script
208
209
210       plug   Physical plug number on device, UUID or  identification  of  ma‐
211              chine  This  parameter is always required. Obsoletes: port
212
213
214       ssh    Use SSH connection (Default Value: 1) Obsoletes: secure
215
216       ssh_options
217              SSH options to use (Default Value: -t '/bin/bash  -c  "PS1=\[EX‐
218              PECT\]# /bin/bash --noprofile --norc"')
219
220       username
221              Login  name  This parameter is always required. Obsoletes: login
222
223
224       quiet  Disable logging to stderr. Does not affect --verbose or --debug-
225              file or logging to syslog.
226
227       verbose
228              Verbose  mode.  Multiple  -v flags can be stacked on the command
229              line (e.g., -vvv) to increase verbosity.
230
231       verbose_level
232              Level of debugging detail in output. Defaults to the  number  of
233              --verbose  flags  specified on the command line, or to 1 if ver‐
234              bose=1 in a  stonith  device  configuration  (i.e.,  on  stdin).
235
236
237       debug_file
238              Write debug information to given file Obsoletes: debug
239
240       version
241              Display version information and exit
242
243       help   Display help and exit
244
245       plug_separator
246              Separator  for  plug  parameter when specifying more than 1 plug
247              (Default Value: ,)
248
249       separator
250              Separator for CSV created by 'list' operation (Default Value: ,)
251
252
253       delay  Wait  X  seconds  before  fencing  is started (Default Value: 0)
254
255
256       disable_timeout
257              Disable timeout (true/false) (default: true when run from  Pace‐
258              maker 2.0+)
259
260       login_timeout
261              Wait  X  seconds  for  cmd prompt after login (Default Value: 5)
262
263
264       missing_as_off
265              Missing port returns OFF instead of failure
266
267       power_timeout
268              Test X seconds for status change after  ON/OFF  (Default  Value:
269              20)
270
271       power_wait
272              Wait X seconds after issuing ON/OFF (Default Value: 0)
273
274       shell_timeout
275              Wait  X  seconds  for  cmd prompt after issuing command (Default
276              Value: 3)
277
278       stonith_status_sleep
279              Sleep X seconds between status calls  during  a  STONITH  action
280              (Default Value: 1)
281
282       retry_on
283              Count  of  attempts  to  retry power on (Default Value: 1)
284
285
286       use_sudo
287              Use sudo (without password) when calling 3rd party software  Ob‐
288              soletes: sudo
289
290       ssh_path
291              Path to ssh binary (Default Value: /usr/bin/ssh)
292
293       sudo_path
294              Path to sudo binary (Default Value: /usr/bin/sudo)
295
296
297
298fence_virsh (Fence Agent)         2009-10-20                    FENCE_AGENT(8)
Impressum