1
2FENCE_AGENT(8) System Manager's Manual FENCE_AGENT(8)
3
4
5
7 fence_virsh - Fence agent for virsh
8
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
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 -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 --stonith-status-sleep=[seconds]
125 Sleep X seconds between status calls during a STONITH action
126 (Default Value: 1)
127
128 --retry-on=[attempts]
129 Count of attempts to retry power on (Default Value: 1)
130
131
132 --use-sudo
133 Use sudo (without password) when calling 3rd party software
134
135
136 --ssh-path=[path]
137 Path to ssh binary (Default Value: /usr/bin/ssh)
138
139 --sudo-path=[path]
140 Path to sudo binary (Default Value: /usr/bin/sudo)
141
142
144
145
146 on Power on machine.
147
148 off Power off machine.
149
150 reboot Reboot machine.
151
152 status This returns the status of the plug/virtual machine.
153
154 list List available plugs with aliases/virtual machines if there is
155 support for more then one device. Returns N/A otherwise.
156
157 list-status
158 List available plugs with aliases/virtual machines and their
159 power state if it can be obtained without additional commands.
160
161
162 monitor
163 Check the health of fence device
164
165 metadata
166 Display the XML metadata describing this resource.
167
168 manpage
169 The operational behavior of this is not known.
170
171 validate-all
172 Validate if all required parameters are entered.
173
174
176
177
178 action Fencing action (Default Value: reboot)
179
180 command_prompt
181 Force Python regex for command prompt (Default Value: ['\[EX‐
182 PECT\]#']) Obsoletes: cmd_prompt
183
184 identity_file
185 Identity file (private key) for SSH
186
187 inet4_only
188 Forces agent to use IPv4 addresses only
189
190 inet6_only
191 Forces agent to use IPv6 addresses only
192
193 ip IP address or hostname of fencing device This parameter is al‐
194 ways required. Obsoletes: ipaddr
195
196 ipport TCP/UDP port to use for connection with device (Default Value:
197 22)
198
199 password
200 Login password or passphrase Obsoletes: passwd
201
202 password_script
203 Script to run to retrieve password Obsoletes: passwd_script
204
205
206 plug Physical plug number on device, UUID or identification of ma‐
207 chine This parameter is always required. Obsoletes: port
208
209
210 ssh Use SSH connection (Default Value: 1) Obsoletes: secure
211
212 ssh_options
213 SSH options to use (Default Value: -t '/bin/bash -c "PS1=\[EX‐
214 PECT\]# /bin/bash --noprofile --norc"')
215
216 username
217 Login name This parameter is always required. Obsoletes: login
218
219
220 quiet Disable logging to stderr. Does not affect --verbose or --debug-
221 file or logging to syslog.
222
223 verbose
224 Verbose mode. Multiple -v flags can be stacked on the command
225 line (e.g., -vvv) to increase verbosity.
226
227 verbose_level
228 Level of debugging detail in output. Defaults to the number of
229 --verbose flags specified on the command line, or to 1 if ver‐
230 bose=1 in a stonith device configuration (i.e., on stdin).
231
232
233 debug_file
234 Write debug information to given file Obsoletes: debug
235
236 version
237 Display version information and exit
238
239 help Display help and exit
240
241 separator
242 Separator for CSV created by 'list' operation (Default Value: ,)
243
244
245 delay Wait X seconds before fencing is started (Default Value: 0)
246
247
248 disable_timeout
249 Disable timeout (true/false) (default: true when run from Pace‐
250 maker 2.0+)
251
252 login_timeout
253 Wait X seconds for cmd prompt after login (Default Value: 5)
254
255
256 missing_as_off
257 Missing port returns OFF instead of failure
258
259 power_timeout
260 Test X seconds for status change after ON/OFF (Default Value:
261 20)
262
263 power_wait
264 Wait X seconds after issuing ON/OFF (Default Value: 0)
265
266 shell_timeout
267 Wait X seconds for cmd prompt after issuing command (Default
268 Value: 3)
269
270 stonith_status_sleep
271 Sleep X seconds between status calls during a STONITH action
272 (Default Value: 1)
273
274 retry_on
275 Count of attempts to retry power on (Default Value: 1)
276
277
278 use_sudo
279 Use sudo (without password) when calling 3rd party software Ob‐
280 soletes: sudo
281
282 ssh_path
283 Path to ssh binary (Default Value: /usr/bin/ssh)
284
285 sudo_path
286 Path to sudo binary (Default Value: /usr/bin/sudo)
287
288
289
290fence_virsh (Fence Agent) 2009-10-20 FENCE_AGENT(8)