<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!-- Please adjust the date whenever revising the manpage. -->
- <!ENTITY dhdate "<date>May 16, 2007</date>">
+ <!ENTITY dhdate "<date>July 01, 2008</date>">
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are
allowed: see man(7), man(1). -->
<!ENTITY dhsection "<manvolnum>8</manvolnum>">
<copyright>
<year>2006</year>
<year>2007</year>
+ <year>2008</year>
<holder>Google Inc.</holder>
</copyright>
&dhdate;
<arg>--swap-size <replaceable>disksize</replaceable></arg>
<arg>-m <replaceable>memsize</replaceable></arg>
<sbr>
- <arg>-o <replaceable>os-type</replaceable></arg>
+
<arg>-b <replaceable>bridge</replaceable></arg>
+ <arg>--mac <replaceable>MAC-address</replaceable></arg>
+ <sbr>
+
+ <arg>--hvm-boot-order <replaceable>boot-order</replaceable></arg>
+ <arg>--hvm-acpi <replaceable>ACPI-support</replaceable></arg>
+ <sbr>
+
+ <arg>--hvm-pae <replaceable>PAE-support</replaceable></arg>
+ <sbr>
+
+ <arg>--hvm-cdrom-image-path
+ <replaceable>cdrom-image-path</replaceable></arg>
+ <sbr>
+
+ <arg>--hvm-nic-type <replaceable>NICTYPE</replacable></arg>
+ <sbr>
+
+ <arg>--hvm-disk-type
+ <replaceale>DISKTYPE</replaceable></arg>
+ <sbr>
+
+ <arg>--vnc-bind-address
+ <replaceable>vnc-bind-address</replaceable></arg>
+ <sbr>
+
+ <arg>--kernel<group choice="req">
+ <arg>default</arg>
+ <arg><replaceable>kernel_path</replaceable></arg>
+ </group></arg>
<sbr>
- <arg choice="req">-t<group>
+
+ <arg>--initrd<group choice="req">
+ <arg>default</arg>
+ <arg>none</arg>
+ <arg><replaceable>initrd_path</replaceable></arg>
+ </group></arg>
+ <sbr>
+
+ <arg>--cpu <replaceable>vcpus</replaceable></arg>
+ <arg>--ip<group choice="req">
+ <arg>default</arg>
+ <arg>none</arg>
+ <arg><replaceable>ip-address</replaceable></arg>
+ </group></arg>
+ <sbr>
+
+ <arg>--no-wait-for-sync</arg>
+ <arg>--no-start</arg>
+ <arg>--no-ip-check</arg>
+ <sbr>
+
+ <arg choice="req">-t<group choice="req">
<arg>diskless</arg>
<arg>plain</arg>
<arg>local_raid1</arg>
<arg>remote_raid1</arg>
<arg>drbd</arg>
- </group>
- </arg>
+ </group></arg>
<sbr>
- <arg choice="req">-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
+
+ <group choice="req">
+ <arg>-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
+ <arg>--iallocator <replaceable>name</replaceable></arg>
+ </group>
+ <sbr>
+
+ <arg choice="req">-o <replaceable>os-type</replaceable></arg>
+ <sbr>
+
<arg choice="req"><replaceable>instance</replaceable></arg>
</cmdsynopsis>
+
<para>
Creates a new instance on the specified
host. <replaceable>instance</replaceable> must be in DNS and
</para>
<para>
+ The <option>--mac</option> option specifies the MAC address
+ of the ethernet interface for the instance. If this option
+ is not specified, a new MAC address is generated randomly with
+ the configured MAC prefix. The randomly generated MAC
+ address is guaranteed to be unique among the instances of
+ this cluster.
+ </para>
+
+ <para>
+ The <option>--hvm-boot-order</option> option specifies the
+ boot device order for Xen HVM instances. The boot order is a
+ string of letters listing the boot devices, with valid
+ device letters being:
+ </para>
+
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ floppy drive
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>c</term>
+ <listitem>
+ <para>
+ hard disk
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>d</term>
+ <listitem>
+ <para>
+ CDROM drive
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>n</term>
+ <listitem>
+ <para>
+ network boot (PXE)
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+
+ <para>
+ The default is not to set an HVM boot order which is
+ interpreted as 'dc'. This option, like all options starting
+ with 'hvm', is only relevant for Xen HVM instances and
+ ignored by all other instance types.
+ </para>
+
+ <para>
+ The <option>--hvm-acpi</option> option specifies if Xen
+ should enable ACPI support for this HVM instance. Valid
+ values are true or false. The default value is false,
+ disabling ACPI support for this instance.
+ </para>
+
+ <para>
+ The <option>--hvm-pae</option> option specifies if Xen
+ should enabled PAE support for this HVM instance. Valid
+ values are true or false. The default is false, disabling
+ PAE support for this instance.
+ </para>
+
+ <para>
+ The <option>--hvm-cdrom-image-path</option> option specifies the
+ path to the file Xen uses to emulate a virtual CDROM drive
+ for this HVM instance. Valid values are either an
+ absolute path to an existing file or None, which disables
+ virtual CDROM support for this instance. The default is
+ None, disabling virtual CDROM support.
+ </para>
+
+ <para>
+ The <option>--hvm-nic-type</option> specifies the NIC type
+ Xen should use for this HVM instance. Valid choices are
+ rtl8139, ne2k_pci, ne2k_isa and paravirtual with rtl8139
+ as the default. The paravirtual setting is intended for use
+ with the GPL PV drivers inside HVM Windows instances.
+ </para>
+
+ <para>
+ The <option>--hvm-disk-type</option> specifies the disk type
+ Xen should use for the HVM instance. Valid choices are ioemu
+ and paravirtual with ioemu as the default. The paravirtual
+ setting is intended for use with the GPL PV drivers inside
+ HVM Windows instances.
+ </para>
+
+ <para>
+ The <option>--vnc-bind-address</option> option specifies the
+ address that the VNC listener for this instance should bind
+ to. Valid values are IPv4 addresses. Use the address 0.0.0.0
+ to bind to all available interfaces (this is the default)
+ or specify the address of one of the interfaces on the node
+ to restrict listing to that interface.
+ </para>
+
+ <para>
+ The <option>--iallocator</option> option specifies the instance
+ allocator plugin to use. If you pass in this option the allocator
+ will select nodes for this instance automatically, so you don't need
+ to pass them with the <option>-n</option> option. For more
+ information please refer to the instance allocator documentation.
+ </para>
+
+ <para>
+ The <option>--kernel</option> option allows the instance to
+ use a custom kernel (if a filename is passed) or to use the
+ default kernel (<filename>@CUSTOM_XEN_KERNEL@</filename>), if the
+ string <constant>default</constant> is passed.
+ </para>
+
+ <para>
+ The <option>--initrd</option> option is similar: it allows
+ the instance to use a custom initrd (if a filename is
+ passed) or to use the default initrd
+ (<filename>@CUSTOM_XEN_INITRD@</filename>), if the string
+ <constant>default</constant> is passed, or to disable the
+ use of an initrd, if the string <constant>none</constant> is
+ passed. Note that in the case the instance is set to use the
+ default initrd and it doesn't exist, it will be silently
+ ignored; if the instance is set to use a custom initrd and
+ it doesn't exist, this will be treated as an error and will
+ prevent the startup of the instance.
+ </para>
+
+ <para>
The <option>-t</option> options specifies the disk layout type for
the instance. The available choices are:
<variablelist>
</para>
<para>
+ Use the <option>--cpu</option> option to set the number of virtual
+ CPUs.
+ </para>
+
+ <para>
+ To pass an IPv4 address to the hypervisor, specify the
+ <option>--ip</option> option. Note that this IP address will not be
+ used by the OS scripts and changing it later will change the address
+ that the instance will actually use.
+ </para>
+
+ <para>
+ In case you don't want the new instance to be automatically started,
+ specify the <option>--no-start</option> option.
+ </para>
+
+ <para>
+ Ganeti will not check whether an instance's IP address is already
+ alive if the <option>--no-ip-check</option> option is specified.
+ </para>
+
+ <para>
Example:
<screen>
# gnt-instance add -t plain -s 30g -m 512 -o debian-etch \
<command>list</command>
<arg>--no-headers</arg>
<arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
- <arg>-o <replaceable>FIELD,...</replaceable></arg>
+ <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
</cmdsynopsis>
<para>
<varlistentry>
<term>oper_state</term>
<listitem>
- <simpara>the actual state of the instance; can take of
- the values "running", "stopped", "(node down)"</simpara>
+ <simpara>the actual state of the instance; can be
+ one of the values "running", "stopped", "(node
+ down)"</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>status</term>
+ <listitem>
+ <simpara>combined form of admin_state and oper_stat;
+ this can be one of:
+ <computeroutput>ERROR_nodedown</computeroutput> if the
+ node of the instance is down,
+ <computeroutput>ERROR_down</computeroutput> if the
+ instance should run but is down,
+ <computeroutput>ERROR_up</computeroutput> if the
+ instance should be stopped but is actually running,
+ <computeroutput>ADMIN_down</computeroutput> if the
+ instance has been stopped (and is stopped) and
+ <computeroutput>running</computeroutput> if the
+ instance is set to be running (and is
+ running)</simpara>
</listitem>
</varlistentry>
<varlistentry>
</simpara>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>sda_size</term>
+ <listitem>
+ <simpara>the size of the instance's first disk</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>sdb_size</term>
+ <listitem>
+ <simpara>the size of the instance's second disk</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>vcpus</term>
+ <listitem>
+ <simpara>the number of VCPUs allocated to the
+ instance</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>tags</term>
+ <listitem>
+ <simpara>comma-separated list of the instances's
+ tags</simpara>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
<para>
+ If the value of the option starts with the character
+ <constant>+</constant>, the new fields will be added to the
+ default list. This allows to quickly see the default list
+ plus a few other fields, instead of retyping the entire list
+ of fields.
+ </para>
+
+ <para>
There is a subtle grouping about the available output
- fields: all fields except for <option>oper_state</option>
- and <option>oper_ram</option> are configuration value and
- not run-time values. So if you don't select any of the
- <option>oper_*</option> fields, the query will be satisfied
+ fields: all fields except for <option>oper_state</option>,
+ <option>oper_ram</option> and <option>status</option> are
+ configuration value and not run-time values. So if you don't
+ select any of the these fields, the query will be satisfied
instantly from the cluster configuration, without having to
ask the remote nodes for the data. This can be helpful for
big clusters when you only want some data and it makes sense
<arg choice="opt">-p <replaceable>vcpus</replaceable></arg>
<arg choice="opt">-i <replaceable>ip</replaceable></arg>
<arg choice="opt">-b <replaceable>bridge</replaceable></arg>
+ <arg choice="opt">--mac <replaceable>MAC-address</replaceable></arg>
+ <arg>--hvm-boot-order <replaceable>boot-order</replaceable></arg>
+ <arg>--hvm-acpi <replaceable>ACPI-support</replaceable></arg>
+ <arg>--hvm-pae <replaceable>PAE-support</replaceable></arg>
+ <arg>--hvm-cdrom-image-path
+ <replaceable>cdrom-image-path</replaceable></arg>
+ <arg>--hvm-nic-type <replaceable>NICTYPE</replaceable></arg>
+ <arg>--hvm-disk-type <replaceable>DISKTYPE</replaceable></arg>
+ <arg>--vnc-bind-address
+ <replaceable>vnc-bind-address</replaceable></arg>
+
+ <sbr>
+ <arg>--kernel <group choice="req">
+ <arg>default</arg>
+ <arg><replaceable>kernel_path</replaceable></arg>
+ </group></arg>
+ <sbr>
+ <arg>--initrd <group choice="req">
+ <arg>default</arg>
+ <arg>none</arg>
+ <arg><replaceable>initrd_path</replaceable></arg>
+ </group> </arg>
+ <sbr>
<arg choice="req"><replaceable>instance</replaceable></arg>
</cmdsynopsis>
<para>
- Modify the memory size, number of vcpus, ip address and/or bridge
- for an instance.
+ Modify the memory size, number of vcpus, ip address, MAC
+ address and/or bridge for an instance.
</para>
<para>
</para>
<para>
+ The <option>--kernel</option>, <option>--initrd</option>
+ and <option>--hvm-boot-order</option>
+ options are described in the <command>add</command> command.
+ </para>
+
+ <para>
+ Additionally, the HVM boot order can be reset to the default
+ values by using <option>--hvm-boot-order=default</option>.
+ </para>
+
+ <para>
+ The <option>--hvm-acpi</option> option specifies if Xen
+ should enable ACPI support for this HVM instance. Valid
+ values are true or false.
+ </para>
+
+ <para>
+ The <option>--hvm-pae</option> option specifies if Xen
+ should enabled PAE support for this HVM instance. Valid
+ values are true or false.
+ </para>
+
+ <para>
+ The <option>--hvm-cdrom-image-path</option> specifies the
+ path to the file xen uses to emulate a virtual CDROM drive
+ for this HVM instance. Valid values are either an
+ absolute path to an existing file or None, which disables
+ virtual CDROM support for this instance.
+ </para>
+
+ <para>
+ The <option>--hvm-nic-type</option> specifies the NIC type
+ Xen should use for this HVM instance. Valid choices are
+ rtl8139, ne2k_pci, ne2k_isa and paravirtual with rtl8139
+ as the default. The paravirtual setting is intended for use
+ with the GPL PV drivers inside HVM Windows instances.
+ </para>
+
+ <para>
+ The <option>--hvm-disk-type</option> specifies the disk type
+ Xen should use for the HVM instance. Valid choices are ioemu
+ and paravirtual with ioemu as the default. The paravirtual
+ setting is intended for use with the GPL PV drivers inside
+ HVM Windows instances.
+ </para>
+
+ <para>
+ The <option>--vnc-bind-address</option> specifies the
+ address that the VNC listener for this instance should bind
+ to. Valid values are IPv4 addresses. Use the address 0.0.0.0
+ to bind to all available interfaces.
+ </para>
+
+ <para>
All the changes take effect at the next restart. If the
instance is running, there is no effect on the instance.
</para>
<command>reinstall</command>
<arg choice="opt">-o <replaceable>os-type</replaceable></arg>
<arg choice="opt">-f <replaceable>force</replaceable></arg>
+ <arg>--interactive</arg>
<arg choice="req"><replaceable>instance</replaceable></arg>
</cmdsynopsis>
<option>--os-type</option> is specified, the operating system is
changed.
</para>
+
+ <para>
+ The <option>--interactive</option> option switches to an
+ interactive reinstall. The user is prompted to select the OS
+ template from the list of available OS templates.
+ </para>
</refsect3>
<refsect3>
<cmdsynopsis>
<command>replace-disks</command>
- <arg choice="opt">--new-secondary <replaceable>NODE</replaceable></arg>
+
+ <group choice="req">
+ <arg>--new-secondary <replaceable>NODE</replaceable></arg>
+ <arg>--iallocator <replaceable>name</replaceable></arg>
+ </group>
+
<arg choice="req"><replaceable>instance</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>replace-disks</command>
- <arg choice="req">-s</arg>
- <arg choice="req">--new-secondary <replaceable>NODE</replaceable></arg>
+
+ <group choice="req">
+ <arg>--iallocator <replaceable>name</replaceable></arg>
+ <arg>--new-secondary <replaceable>NODE</replaceable></arg>
+ </group>
+ <sbr>
+
+ <arg choice="opt">-s</arg>
<arg choice="req"><replaceable>instance</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>replace-disks</command>
+
<group>
<arg choice="req">-s</arg>
<arg choice="req">-p</arg>
node of the instance only, without changing the node.
</para>
+ <para>
+ Specifying <option>--iallocator</option> enables secondary node
+ replacement and and makes the new secondary be selected automatically
+ by the specified allocator plugin.
+ </para>
</refsect3>
<refsect3>
</refsect3>
+ <refsect3>
+ <title>GROW-DISK</title>
+ <cmdsynopsis>
+ <command>grow-disk</command>
+ <arg>--no-wait-for-sync</arg>
+ <arg choice="req"><replaceable>instance</replaceable></arg>
+ <arg choice="req"><replaceable>disk</replaceable></arg>
+ <arg choice="req"><replaceable>amount</replaceable></arg>
+ </cmdsynopsis>
+
+ <para>
+ Grows an instance's disk. This is only possible for
+ instances having a <literal>plain</literal> or
+ <literal>drbd</literal> disk template.
+ </para>
+
+ <para>
+ Note that this command only change the block device size; it
+ will not grow the actual filesystems, partitions, etc. that
+ live on that disk. Usually, you will need to:
+ <orderedlist>
+ <listitem>
+ <simpara>use <command>gnt-instance grow-disk</command></simpara>
+ </listitem>
+ <listitem>
+ <simpara>reboot the instance (later, at a convenient
+ time)</simpara>
+ </listitem>
+ <listitem>
+ <simpara>use a filesystem resizer, such as
+ <citerefentry> <refentrytitle>ext2online</refentrytitle>
+ <manvolnum>8</manvolnum> </citerefentry> or
+ <citerefentry> <refentrytitle>xfs_growfs</refentrytitle>
+ <manvolnum>8</manvolnum> </citerefentry> to resize the
+ filesystem, or use <citerefentry>
+ <refentrytitle>fdisk</refentrytitle>
+ <manvolnum>8</manvolnum> </citerefentry> to change the
+ partition table on the disk
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </para>
+
+
+ <para>
+ The <replaceable>disk</replaceable> argument is either
+ <literal>sda</literal> or <literal>sdb</literal>. The
+ <replaceable>amount</replaceable> argument is given either
+ as a number (and it represents the amount to increase the
+ disk with in mebibytes) or can be given similar to the
+ arguments in the create instance operation, with a suffix
+ denoting the unit.
+ </para>
+
+ <para>
+ Note that the disk grow operation might complete on one node
+ but fail on the other; this will leave the instance with
+ different-sized LVs on the two nodes, but this will not
+ create problems (except for unused space).
+ </para>
+
+ <para>
+ If you do not want gnt-instance to wait for the new disk
+ region to be synced, use the
+ <option>--no-wait-for-sync</option> option.
+ </para>
+
+
+ <para>Example (increase sda for instance1 by 16GiB):
+ <screen>
+# gnt-instance grow-disk instance1.example.com sda 16g
+ </screen>
+ </para>
+
+ <para>
+ Also note that disk shrinking will not be supported; use
+ <command>gnt-backup export</command> and then
+ <command>gnt-backup import</command> to reduce the disk size
+ of an instance.
+ </para>
+ </refsect3>
+
</refsect2>
<refsect2>
</para>
</refsect3>
+ <refsect3>
+ <title>MIGRATE</title>
+
+ <cmdsynopsis>
+ <command>migrate</command>
+ <arg>-f</arg>
+ <arg choice="req">--cleanup</arg>
+ <arg choice="req"><replaceable>instance</replaceable></arg>
+ </cmdsynopsis>
+
+ <cmdsynopsis>
+ <command>migrate</command>
+ <arg>-f</arg>
+ <arg>--non-live</arg>
+ <arg choice="req"><replaceable>instance</replaceable></arg>
+ </cmdsynopsis>
+
+ <para>
+ Migrate will move the instance to its secondary node without
+ shutdown. It only works for instances having the drbd8 disk
+ template type.
+ </para>
+
+ <para>
+ The migration command needs a perfectly healthy instance, as
+ we rely on the dual-master capability of drbd8 and the disks
+ of the instance are not allowed to be degraded.
+ </para>
+
+ <para>
+ The <option>--non-live</option> option will switch (for the
+ hypervisors that support it) between a "fully live"
+ (i.e. the interruption is as minimal as possible) migration
+ and one in which the instance is frozen, its state saved and
+ transported to the remote node, and then resumed there. This
+ all depends on the hypervisor support for two different
+ methods. In any case, it is not an error to pass this
+ parameter (it will just be ignored if the hypervisor doesn't
+ support it).
+ </para>
+
+ <para>
+ If the <option>--cleanup</option> option is passed, the
+ operation changes from migration to attempting recovery from
+ a failed previous migration. In this mode, ganeti checks if
+ the instance runs on the correct node (and updates its
+ configuration if not) and ensures the instances's disks are
+ configured correctly. In this mode, the
+ <option>--non-live</option> option is ignored.
+ </para>
+
+ <para>
+ The option <option>-f</option> will skip the prompting for
+ confirmation.
+ </para>
+
+ <para>
+ Example (and expected output):
+ <screen>
+# gnt-instance migrate instance1
+Migrate will happen to the instance instance1. Note that migration is
+**experimental** in this version. This might impact the instance if
+anything goes wrong. Continue?
+y/[n]/?: y
+* checking disk consistency between source and target
+* ensuring the target is in secondary mode
+* changing disks into dual-master mode
+ - INFO: Waiting for instance instance1 to sync disks.
+ - INFO: Instance instance1's disks are in sync.
+* migrating instance to node2.example.com
+* changing the instance's disks on source node to secondary
+ - INFO: Waiting for instance instance1 to sync disks.
+ - INFO: Instance instance1's disks are in sync.
+* changing the instance's disks to single-master
+#
+ </screen>
+ </para>
+ </refsect3>
+
</refsect2>
<refsect2>