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 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 This parameter is always required.
45
46 -u, --ipport=[port]
47 TCP/UDP port to use for connection with device (Default Value:
48 22)
49
50 -l, --username=[name]
51 Login Name This parameter is always required.
52
53 -p, --password=[password]
54 Login password or passphrase
55
56 -S, --password-script=[script]
57 Script to retrieve password
58
59 -n, --plug=[id]
60 Physical plug number, name of virtual machine or UUID This
61 parameter is always required.
62
63 -x, --ssh
64 SSH connection (Default Value: 1)
65
66 --ssh-options=[options]
67 SSH options to use (Default Value: -t '/bin/bash -c "PS1=#
68 /bin/bash --noprofile --norc"')
69
70 -v, --verbose
71 Verbose mode
72
73 -D, --debug-file=[debugfile]
74 Write debug information to given file
75
76 -V, --version
77 Display version information and exit
78
79 -h, --help
80 Display help and exit
81
82 -C, --separator=[char]
83 Separator for CSV created by operation list (Default Value: ,)
84
85
86 --delay=[seconds]
87 Wait X seconds before fencing is started (Default Value: 0)
88
89
90 --login-timeout=[seconds]
91 Wait X seconds for cmd prompt after login (Default Value: 5)
92
93
94 --power-timeout=[seconds]
95 Test X seconds for status change after ON/OFF (Default Value:
96 20)
97
98 --power-wait=[seconds]
99 Wait X seconds after issuing ON/OFF (Default Value: 0)
100
101 --shell-timeout=[seconds]
102 Wait X seconds for cmd prompt after issuing command (Default
103 Value: 3)
104
105 --retry-on=[attempts]
106 Count of attempts to retry power on (Default Value: 1)
107
108 --use-sudo
109 Use sudo (without password) when calling 3rd party sotfware.
110
111
112 --ssh-path=[path]
113 Path to ssh binary (Default Value: /usr/bin/ssh)
114
115 --sudo-path=[path]
116 Path to sudo binary (Default Value: /usr/bin/sudo)
117
118
120
121
122 on Power on machine.
123
124 off Power off machine.
125
126 reboot Reboot machine.
127
128 status This returns the status of the plug/virtual machine.
129
130 list List available plugs with aliases/virtual machines if there is
131 support for more then one device. Returns N/A otherwise.
132
133 list-status
134 List available plugs with aliases/virtual machines and their
135 power state if it can be obtained without additional commands.
136
137
138 monitor
139 Check the health of fence device
140
141 metadata
142 Display the XML metadata describing this resource.
143
144
146
147
148 action Fencing Action (Default Value: reboot)
149
150 cmd_prompt
151 Force Python regex for command prompt (Default Value:
152 ['\[EXPECT\]#\ '])
153
154 identity_file
155 Identity file for ssh
156
157 inet4_only
158 Forces agent to use IPv4 addresses only
159
160 inet6_only
161 Forces agent to use IPv6 addresses only
162
163 ipaddr IP Address or Hostname This parameter is always required.
164
165 ipport TCP/UDP port to use for connection with device (Default Value:
166 22)
167
168 login Login Name This parameter is always required.
169
170 passwd Login password or passphrase
171
172 passwd_script
173 Script to retrieve password
174
175 port Physical plug number, name of virtual machine or UUID This
176 parameter is always required.
177
178 secure SSH connection (Default Value: 1)
179
180 ssh_options
181 SSH options to use (Default Value: -t '/bin/bash -c "PS1=#
182 /bin/bash --noprofile --norc"')
183
184 verbose
185 Verbose mode
186
187 debug Write debug information to given file
188
189 version
190 Display version information and exit
191
192 help Display help and exit
193
194 separator
195 Separator for CSV created by operation list (Default Value: ,)
196
197
198 delay Wait X seconds before fencing is started (Default Value: 0)
199
200
201 login_timeout
202 Wait X seconds for cmd prompt after login (Default Value: 5)
203
204
205 power_timeout
206 Test X seconds for status change after ON/OFF (Default Value:
207 20)
208
209 power_wait
210 Wait X seconds after issuing ON/OFF (Default Value: 0)
211
212 shell_timeout
213 Wait X seconds for cmd prompt after issuing command (Default
214 Value: 3)
215
216 retry_on
217 Count of attempts to retry power on (Default Value: 1)
218
219 sudo Use sudo (without password) when calling 3rd party sotfware.
220
221
222 ssh_path
223 Path to ssh binary (Default Value: /usr/bin/ssh)
224
225 sudo_path
226 Path to sudo binary (Default Value: /usr/bin/sudo)
227
228
229
230fence_virsh (Fence Agent) 2009-10-20 FENCE_AGENT(8)