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:
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
77
78 -D, --debug-file=[debugfile]
79 Write debug information to given file
80
81 -V, --version
82 Display version information and exit
83
84 -h, --help
85 Display help and exit
86
87 -C, --separator=[char]
88 Separator for CSV created by 'list' operation (Default Value: ,)
89
90
91 --delay=[seconds]
92 Wait X seconds before fencing is started (Default Value: 0)
93
94
95 --login-timeout=[seconds]
96 Wait X seconds for cmd prompt after login (Default Value: 5)
97
98
99 --missing-as-off
100 Missing port returns OFF instead of failure
101
102 --power-timeout=[seconds]
103 Test X seconds for status change after ON/OFF (Default Value:
104 20)
105
106 --power-wait=[seconds]
107 Wait X seconds after issuing ON/OFF (Default Value: 0)
108
109 --shell-timeout=[seconds]
110 Wait X seconds for cmd prompt after issuing command (Default
111 Value: 3)
112
113 --retry-on=[attempts]
114 Count of attempts to retry power on (Default Value: 1)
115
116
117 --use-sudo
118 Use sudo (without password) when calling 3rd party software
119
120
121 --ssh-path=[path]
122 Path to ssh binary (Default Value: /usr/bin/ssh)
123
124 --sudo-path=[path]
125 Path to sudo binary (Default Value: /usr/bin/sudo)
126
127
129
130
131 on Power on machine.
132
133 off Power off machine.
134
135 reboot Reboot machine.
136
137 status This returns the status of the plug/virtual machine.
138
139 list List available plugs with aliases/virtual machines if there is
140 support for more then one device. Returns N/A otherwise.
141
142 list-status
143 List available plugs with aliases/virtual machines and their
144 power state if it can be obtained without additional commands.
145
146
147 monitor
148 Check the health of fence device
149
150 metadata
151 Display the XML metadata describing this resource.
152
153 manpage
154 The operational behavior of this is not known.
155
156 validate-all
157 Validate if all required parameters are entered.
158
159
161
162
163 action Fencing action (Default Value: reboot)
164
165 command_prompt
166 Force Python regex for command prompt (Default Value:
167 ['\[EXPECT\]#\ ']) Obsoletes: cmd_prompt
168
169 identity_file
170 Identity file (private key) for SSH
171
172 inet4_only
173 Forces agent to use IPv4 addresses only
174
175 inet6_only
176 Forces agent to use IPv6 addresses only
177
178 ip IP address or hostname of fencing device This parameter is
179 always required. Obsoletes: ipaddr
180
181 ipport TCP/UDP port to use for connection with device (Default Value:
182 22)
183
184 password
185 Login password or passphrase Obsoletes: passwd
186
187 password_script
188 Script to run to retrieve password Obsoletes: passwd_script
189
190
191 plug Physical plug number on device, UUID or identification of
192 machine This parameter is always required. Obsoletes: port
193
194
195 ssh Use SSH connection (Default Value: 1) Obsoletes: secure
196
197 ssh_options
198 SSH options to use (Default Value: -t '/bin/bash -c
199 "PS1=\[EXPECT\]# /bin/bash --noprofile --norc"')
200
201 username
202 Login name This parameter is always required. Obsoletes: login
203
204
205 quiet Disable logging to stderr. Does not affect --verbose or --debug-
206 file or logging to syslog.
207
208 verbose
209 Verbose mode
210
211 debug_file
212 Write debug information to given file Obsoletes: debug
213
214 version
215 Display version information and exit
216
217 help Display help and exit
218
219 separator
220 Separator for CSV created by 'list' operation (Default Value: ,)
221
222
223 delay Wait X seconds before fencing is started (Default Value: 0)
224
225
226 login_timeout
227 Wait X seconds for cmd prompt after login (Default Value: 5)
228
229
230 missing_as_off
231 Missing port returns OFF instead of failure
232
233 power_timeout
234 Test X seconds for status change after ON/OFF (Default Value:
235 20)
236
237 power_wait
238 Wait X seconds after issuing ON/OFF (Default Value: 0)
239
240 shell_timeout
241 Wait X seconds for cmd prompt after issuing command (Default
242 Value: 3)
243
244 retry_on
245 Count of attempts to retry power on (Default Value: 1)
246
247
248 use_sudo
249 Use sudo (without password) when calling 3rd party software
250 Obsoletes: sudo
251
252 ssh_path
253 Path to ssh binary (Default Value: /usr/bin/ssh)
254
255 sudo_path
256 Path to sudo binary (Default Value: /usr/bin/sudo)
257
258
259
260fence_virsh (Fence Agent) 2009-10-20 FENCE_AGENT(8)