Documentation fixes.
[virt-hostinfo.git] / hostinfo-set / hostinfo-set.pl
1 #!/usr/bin/perl -w
2 # @configure_input@
3 # virt-hostinfo
4 # Copyright (C) 2009 Red Hat Inc.
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
20 use strict;
21
22 #use Sys::Virt;
23
24 =pod
25
26 =head1 NAME
27
28 hostinfo-set - enable or disable hostinfo for a guest
29
30 =head1 SYNOPSIS
31
32  hostinfo-set [--options] [GUESTNAME [GUESTNAME...]]
33
34  hostinfo-set --enable GUESTNAME [GUESTNAME...]
35
36  hostinfo-set --disable GUESTNAME [GUESTNAME...]
37
38 =head1 DESCRIPTION
39
40 This command is used to enable or disable the L<hostinfo(8)> feature
41 per-guest.  Note that you also need to enable the hostinfo service for
42 the host as a whole.  You may also wish to configure what each guest
43 has access to.  See L<hostinfo(8)> for information about how to do
44 that.
45
46 The simplest use is to run this with C<--enable> or C<--disable> to
47 (respectively) enable or disable hostinfo for the libvirt guest(s)
48 named on the command line.  For example:
49
50  # virsh list --all
51   Id Name                 State
52  ----------------------------------
53    1 F11                  running
54    - winxp                shut off
55  
56  # hostinfo-set --enable F11
57
58 To enable hostinfo for every guest, you could do:
59
60  hostinfo-set --enable --all
61
62 =cut
63
64
65
66 =head1 OPTIONS
67
68 =over 4
69
70 =item B<--help>
71
72 Display brief help.
73
74 =item B<--version>
75
76 Display version number and exit.
77
78 =item B<--connect URI> | B<-c URI>
79
80 Connect to libvirt using the given URI.  If omitted then
81 we connect to the default libvirt hypervisor.
82
83 =item B<--enable>
84
85 Enable hostinfo per-guest for each of the guests listed on the command
86 line.
87
88 =item B<--disable>
89
90 Disable hostinfo per-guest for each of the guests listed on the command
91 line.
92
93 Either C<--enable> or C<--disable> must be given.
94
95 =item B<--all>
96
97 If this option is given, then we try to enable or disable hostinfo for
98 every guest known to libvirt (both running and inactive).
99
100 =back
101
102 =cut
103
104
105
106 =head1 SEE ALSO
107
108 See the L<hostinfo(8)> manpage for the main documentation about
109 hostinfo configuration and troubleshooting.
110
111 To see if hostinfo is enabled or disabled for a particular guest, use
112 the L<hostinfo-status(8)> command.
113
114 See also:
115 L<hostinfo-test(8)>,
116 L<virt-install(1)>,
117 L<virt-manager(1)>,
118 L<http://fedoraproject.org/wiki/Features/Hostinfo>,
119 L<http://libvirt.org/>.
120
121 =head1 AUTHORS
122
123 Richard W.M. Jones (C<rjones at redhat dot com>)
124
125 =head1 COPYRIGHT
126
127 Copyright (C) 2009 Red Hat Inc.
128 L<http://fedoraproject.org/wiki/Features/Hostinfo>
129
130 This program is free software; you can redistribute it and/or modify
131 it under the terms of the GNU General Public License as published by
132 the Free Software Foundation; either version 2 of the License, or
133 (at your option) any later version.
134
135 This program is distributed in the hope that it will be useful,
136 but WITHOUT ANY WARRANTY; without even the implied warranty of
137 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
138 GNU General Public License for more details.
139
140 You should have received a copy of the GNU General Public License
141 along with this program; if not, write to the Free Software
142 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.