3 mclu - Mini Cloud, a tiny, sane cloud
7 mclu [-f mclu.conf] [--options] [list|status|boot|...] [...]
24 Display brief help message and exit.
28 =item B<--config-file mclu.conf>
30 Specify the path to the configuration file. If this command option is
31 I<not> given, then the environment variable C<MCLU_CONFIG> is used,
32 and if that environment variable is not set then C</etc/mclu.conf> is
35 See also: L</CONFIGURATION FILE> below.
41 Enable verbose / debugging messages.
47 Display version number and exit.
55 =item B<mclu boot template [host:]name [--memory ..] [--vcpus ..]>
57 Boot (create) a new instance from B<template>. It will be started on
58 B<host> and named B<name>. If the C<host:> prefix is not given then
59 it is started on the first host that has sufficient free memory.
61 The instance is created by running the template script. You can
62 control resources using the following options:
68 Open the serial console immediately after booting the guest. This is
69 the same as using the C<mclu console> subcommand, but quicker.
73 Specify the amount of memory (RAM) to give this guest. You can use
74 a number followed by a unit, eg. C<--memory 4G>
78 Specify the amount of disk space to give this guest. You can use
79 a number followed by a unit, eg. C<--size 20G>
81 =item B<--timezone TZ>
83 Specify the timezone, eg. C<--timezone Europe/London>
87 Specify the number of virtual CPUs to give to the guest. The default
88 is the number of physical CPUs, but not more than 4.
92 Open the graphical console immediately after booting the guest. This is
93 the same as using the C<mclu viewer> subcommand, but quicker.
97 =item B<mclu console [host:]guest>
99 Connect to the serial console console of the named guest.
101 =item B<mclu destroy [host:]guest>
103 Destroy the named guest.
105 Note this permanently deletes the guest and its data.
107 =item B<mclu list [--active] [--all] [--templates]>
109 List all active (running) guests and/or templates. You can use
110 the following options:
116 List only active (running) guests.
120 List active (running) guests, and templates. This is the default.
128 =item B<mclu off node|wildcard ...>
130 Switch the node(s) off. Wildcards can be used in place of hostnames.
132 mclu checks that no guests are running on the nodes. Migrate or shut
133 down the guests first.
135 =item B<mclu on node|wildcard ...>
137 Switch the node(s) on. Wildcards can be used in place of hostnames.
139 This requires Wake-on-LAN support, both on the target host and in the
140 mclu configuration. mclu must have been compiled with the L<wol(1)>
141 client installed, and the C<mclu.conf> file must list a MAC address
145 host0 mac=11:22:33:44:55:66
146 host1 mac=11:22:33:44:55:67
148 =item B<mclu reboot [host:]guest>
154 Display the status of the cloud. This shows you which nodes are on
155 and off, and the amount of resources used and free on each node.
157 =item B<mclu viewer [host:]guest>
159 Open the graphical console of the guest (using L<virt-viewer(1)>).
164 =head1 CONFIGURATION FILE
170 =head1 TEMPLATE FILES
172 Template files are shell scripts which the C<mclu> program calls to
173 perform various operations.
175 Template files must have the extension C<.template>, must be
176 executable (C<chmod +x *.template>), and they must live in the
177 template directory (usually found through the C<$MCLU_PATH>
178 environment variable).
180 Several template files are supplied with mclu sources, and it's a good
181 idea to consult those for examples and when creating your own
184 C<mclu> runs the template with a single parameter in order to "query"
185 the template. All templates must support the C<probe> parameter,
186 which is used to test that the file is a template:
188 $ ./templates/rawhide.template probe
191 Templates should exit with code 2 if they don't know about a parameter:
193 $ ./templates/rawhide.template unknown
197 The current parameters are:
203 The template MUST print the name of the image that it builds. The
204 meaning of this generally follows the conventions of
205 L<virt-builder(1)>, if virt-builder is used by the template.
209 The template MUST build a disk image. Because the C<template build>
210 command could run on any node in the cluster, it won't necessarily
211 have access to other local files on the same node that C<mclu> is
214 The following environment variables are passed to the template:
220 The name of the base image. This is the output of the C<base-image>
225 The output format (eg. C<qcow2>).
237 (Optionally) The output size (in bytes). If not specified, then the
238 template can choose a default size.
242 (Optionally) The timezone.
248 The template MAY print the disk type supported by this guest. Possible
249 values include C<ide>, C<virtio>, C<virtio-scsi>.
253 The template MAY print the minimum memory (RAM) required by this
254 guest. Abbreviations like C<1G> are supported.
258 The template MAY print the minimum disk space required by this guest.
259 Abbreviations like C<10G> are supported.
263 The template MAY print the network type supported by this guest.
264 Possible values include C<e1000>, C<virtio>.
268 The template MUST print C<hello> followed by a newline, and then exit
271 =item recommended-memory
273 The template MAY print the recommended amount of memory (RAM), used if
274 the user does not select any other value. Abbreviations like C<2G>
279 =head1 ENVIRONMENT VARIABLES
285 May be used to override the default configuration file location
286 (C</etc/mclu.conf>). See L</CONFIGURATION FILE> above.
290 The path to the directory that contains template files. See
291 L</TEMPLATE FILES> above.
303 L<http://www.redhat.com/mailman/listinfo/virt-tools-list>
307 Richard W.M. Jones <rjones @ redhat . com>
311 (C) Copyright 2014-2015 Red Hat Inc.
313 This program is free software; you can redistribute it and/or modify
314 it under the terms of the GNU General Public License as published by
315 the Free Software Foundation; either version 2 of the License, or
316 (at your option) any later version.
318 This program is distributed in the hope that it will be useful,
319 but WITHOUT ANY WARRANTY; without even the implied warranty of
320 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
321 GNU General Public License for more details.
323 You should have received a copy of the GNU General Public License
324 along with this program; if not, write to the Free Software
325 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.