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:
32              ['\[EXPECT\]#'])
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
45              always 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
59              machine 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
66              "PS1=\[EXPECT\]# /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       -C, --separator=[char]
95              Separator for CSV created by 'list' operation (Default Value: ,)
96
97
98       --delay=[seconds]
99              Wait X seconds before fencing  is  started  (Default  Value:  0)
100
101
102       --disable-timeout=[true/false]
103              Disable  timeout (true/false) (default: true when run from Pace‐
104              maker 2.0+)
105
106       --login-timeout=[seconds]
107              Wait X seconds for cmd prompt after  login  (Default  Value:  5)
108
109
110       --missing-as-off
111              Missing port returns OFF instead of failure
112
113       --power-timeout=[seconds]
114              Test  X  seconds  for status change after ON/OFF (Default Value:
115              20)
116
117       --power-wait=[seconds]
118              Wait X seconds after issuing ON/OFF (Default Value: 0)
119
120       --shell-timeout=[seconds]
121              Wait X seconds for cmd prompt  after  issuing  command  (Default
122              Value: 3)
123
124       --retry-on=[attempts]
125              Count  of  attempts  to  retry power on (Default Value: 1)
126
127
128       --use-sudo
129              Use sudo (without password)  when  calling  3rd  party  software
130
131
132       --ssh-path=[path]
133              Path to ssh binary (Default Value: /usr/bin/ssh)
134
135       --sudo-path=[path]
136              Path to sudo binary (Default Value: /usr/bin/sudo)
137
138

ACTIONS

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

STDIN PARAMETERS

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