Move gnt-job to ganeti.client.gnt_job
[ganeti-local] / man / gnt-instance.sgml
index 2cf24af..565b22a 100644 (file)
@@ -2,7 +2,7 @@
 
   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
   <!-- Please adjust the date whenever revising the manpage. -->
-  <!ENTITY dhdate      "<date>January 22, 2010</date>">
+  <!ENTITY dhdate      "<date>June 08, 2010</date>">
   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
        allowed: see man(7), man(1). -->
   <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
     &dhucpackage;
 
     &dhsection;
-    <refmiscinfo>ganeti 2.0</refmiscinfo>
+    <refmiscinfo>Ganeti 2.2</refmiscinfo>
   </refmeta>
   <refnamediv>
     <refname>&dhpackage;</refname>
 
-    <refpurpose>ganeti instance administration</refpurpose>
+    <refpurpose>Ganeti instance administration</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <cmdsynopsis>
@@ -51,7 +51,7 @@
 
     <para>
       The <command>&dhpackage;</command> is used for instance
-      administration in the ganeti system.
+      administration in the Ganeti system.
     </para>
 
   </refsect1>
           interpreted (when no unit is given) in mebibytes. You can
           also use one of the suffixes
           <literal>m</literal>, <literal>g</literal> or
-          <literal>t</literal> to specificy the exact the units used;
+          <literal>t</literal> to specify the exact the units used;
           these suffixes map to mebibytes, gibibytes and tebibytes.
         </para>
 
             <varlistentry>
               <term>mac</term>
               <listitem>
-                <simpara>either a value or <constant>GENERATE</constant>
-                  to generate a new unique MAC</simpara>
+                <simpara>either a value or 'generate' to generate a
+                  new unique MAC</simpara>
               </listitem>
             </varlistentry>
             <varlistentry>
                 <quote>none</quote>, <quote>user</quote> or
                 <quote>pool</quote>. Under <quote>none</quote>, the
                 default, nothing is done and instances are run as
-                the ganeti daemon user (normally root).
+                the Ganeti daemon user (normally root).
                 </simpara>
 
                 <simpara>Under <quote>user</quote> kvm will drop
               <listitem>
                 <simpara>Valid for the KVM hypervisor.</simpara>
 
-                <simpara>Under security model <quote>user</quote> the username to
-                run the instance under. It must be a valid username
-                existing on the host.
+                <simpara>Under security model <quote>user</quote> the
+                username to run the instance under. It must be a valid
+                username existing on the host.
                 </simpara>
                 <simpara>Cannot be set under security model <quote>none</quote>
                 or <quote>pool</quote>.
               </listitem>
             </varlistentry>
 
+            <varlistentry>
+              <term>mem_path</term>
+              <listitem>
+                <simpara>Valid for the KVM hypervisor.</simpara>
+
+                <simpara>This option passes the -mem-path argument to kvm with
+                the path (on the node) to the mount point of the hugetlbfs
+                file system, along with the -mem-prealloc argument too.
+                </simpara>
+
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term>use_chroot</term>
+              <listitem>
+                <simpara>Valid for the KVM hypervisor.</simpara>
+
+                <simpara>This boolean option determines wether to run the KVM
+                instance in a chroot directory.
+                </simpara>
+                <para>If it is set to <quote>true</quote>, an empty directory
+                is created before starting the instance and its path is passed via
+                the -chroot flag to kvm.
+                The directory is removed when the instance is stopped.
+                </para>
+
+                <simpara>It is set to <quote>false</quote> by default.</simpara>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term>migration_downtime</term>
+              <listitem>
+                <simpara>Valid for the KVM hypervisor.</simpara>
+
+                <simpara>The maximum amount of time (in ms) a KVM instance is
+                allowed to be frozen during a live migration, in order to copy
+                dirty memory pages. Default value is 30ms, but you may need to
+                increase this value for busy instances.
+                </simpara>
+
+                <simpara>This option is only effective with kvm versions >= 87
+                and qemu-kvm versions >= 0.11.0.
+                </simpara>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term>use_chroot</term>
+              <listitem>
+                <simpara>Valid for the KVM hypervisor.</simpara>
+
+                <simpara>This boolean option determines wether to run the KVM
+                instance in a chroot directory.
+                </simpara>
+
+                <para>If it is set to <quote>true</quote>, an empty
+                directory is created before starting the instance and
+                its path is passed via the <option>-chroot</option>
+                flag to kvm.  The directory is removed when the
+                instance is stopped.
+                </para>
+
+                <simpara>It is set to <quote>false</quote> by
+                default.</simpara>
+
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term>cpu_mask</term>
+              <listitem>
+                <simpara>Valid for the LXC hypervisor.</simpara>
+
+                <simpara>The processes belonging to the given instance are
+                only scheduled on the specified CPUs.
+                </simpara>
+
+                <simpara>
+                The parameter format is a comma-separated list of CPU IDs or
+                CPU ID ranges. The ranges are defined by a lower and higher
+                boundary, separated by a dash. The boundaries are inclusive.
+                </simpara>
+
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term>usb_mouse</term>
+              <listitem>
+                <simpara>Valid for the KVM hypervisor.</simpara>
+
+                <simpara>This option specifies the usb mouse type to be used.
+                It can be <quote>mouse</quote> or <quote>tablet</quote>. When
+                using VNC it's recommended to set it to <quote>tablet</quote>.
+                </simpara>
+              </listitem>
+            </varlistentry>
+
           </variablelist>
 
         </para>
               </listitem>
             </varlistentry>
             <varlistentry>
-              <term>disk_templace</term>
+              <term>disk_template</term>
               <listitem>
                 <simpara>The disk template to use for the instance,
                 the same as in the <command>add</command>
         </para>
 
         <para>
-          The command will display the job id for each submitted instance, as follows:
+          The command will display the job id for each submitted
+          instance, as follows:
           <screen>
 # gnt-instance batch-create instances.json
 instance3: 11224
@@ -996,7 +1097,10 @@ instance5: 11225
           <command>list</command>
           <arg>--no-headers</arg>
           <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
+        <sbr>
+        <arg>--units=<replaceable>UNITS</replaceable></arg>
           <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
+          <arg>--roman</arg>
           <arg rep="repeat">instance</arg>
         </cmdsynopsis>
 
@@ -1014,6 +1118,21 @@ instance5: 11225
         </para>
 
         <para>
+          The units used to display the numeric values in the output
+          varies, depending on the options given. By default, the values
+          will be formatted in the most appropriate unit. If the
+          <option>--separator</option> option is given, then the values
+          are shown in mebibytes to allow parsing by scripts. In both
+          cases, the <option>--units</option> option can be used to
+          enforce a given output unit.
+        </para>
+
+        <para>
+          The <option>--roman</option> option allows latin people to better
+          understand the cluster instances' status.
+        </para>
+
+        <para>
           The <option>-o</option> option takes a comma-separated list
           of output fields. The available fields and their meaning
           are:
@@ -1091,9 +1210,16 @@ instance5: 11225
               </listitem>
             </varlistentry>
             <varlistentry>
+              <term>oper_vcpus</term>
+              <listitem>
+                <simpara>the actual number of VCPUs the instance is using
+                  as seen by the hypervisor</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
               <term>ip</term>
               <listitem>
-                <simpara>the ip address ganeti recognizes as associated with
+                <simpara>the ip address Ganeti recognizes as associated with
                 the first instance interface</simpara>
               </listitem>
             </varlistentry>
@@ -1341,7 +1467,8 @@ instance5: 11225
         <para>
           There is a subtle grouping about the available output
           fields: all fields except for <option>oper_state</option>,
-          <option>oper_ram</option> and <option>status</option> are
+          <option>oper_ram</option>, <option>oper_vcpus</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
@@ -1371,6 +1498,7 @@ instance5: 11225
             <arg>-s</arg>
             <arg>--static</arg>
           </group>
+          <arg>--roman</arg>
           <group choice="req">
             <arg>--all</arg>
             <arg rep="repeat"><replaceable>instance</replaceable></arg>
@@ -1394,6 +1522,13 @@ instance5: 11225
           Use the <option>--all</option> to get info about all instances,
           rather than explicitly passing the ones you're interested in.
         </para>
+
+        <para>
+          The <option>--roman</option> option can be used to cause envy among
+          people who like ancient cultures, but are stuck with non-latin-friendly
+          cluster virtualization technologies.
+        </para>
+
       </refsect3>
 
       <refsect3>
@@ -1516,6 +1651,8 @@ instance5: 11225
             <arg>--secondary</arg>
             <arg>--all</arg>
           </group>
+          <sbr>
+          <arg choice="opt">-O <replaceable>OS_PARAMETERS</replaceable></arg>
           <arg>--submit</arg>
           <arg choice="opt" rep="repeat"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
@@ -1530,7 +1667,8 @@ instance5: 11225
         <para>
           The <option>--select-os</option> option switches to an
           interactive OS reinstall. The user is prompted to select the OS
-          template from the list of available OS templates.
+          template from the list of available OS templates. OS parameters
+          can be overridden using <option>-O</option>.
         </para>
 
         <para>
@@ -1540,8 +1678,7 @@ instance5: 11225
           are selected (either by passing multiple arguments or by
           using the <option>--node</option>,
           <option>--primary</option>, <option>--secondary</option> or
-          <option>--all</option> options), the user must pass both the
-          <option>--force</option> and
+          <option>--all</option> options), the user must pass the
           <option>--force-multiple</option> options to skip the
           interactive confirmation.
         </para>
@@ -1553,7 +1690,6 @@ instance5: 11225
           <command>gnt-job info</command>.
         </para>
 
-
       </refsect3>
 
       <refsect3>
@@ -1562,6 +1698,7 @@ instance5: 11225
         <cmdsynopsis>
           <command>rename</command>
           <arg>--no-ip-check</arg>
+          <arg>--no-name-check</arg>
           <arg>--submit</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
           <arg choice="req"><replaceable>new_name</replaceable></arg>
@@ -1578,6 +1715,14 @@ instance5: 11225
         </para>
 
         <para>
+          The <option>--no-name-check</option> skips the check for the
+          new instance name via the resolver (e.g. in DNS or /etc/hosts,
+          depending on your setup). Since the name check is used to
+          compute the IP address, if you pass this option you must
+          also pass the <option>--no-ip-check</option> option.
+        </para>
+
+        <para>
           The <option>--submit</option> option is used to send the job to
           the master daemon but not wait for its completion. The job
           ID will be shown so that it can be examined via
@@ -1598,6 +1743,7 @@ instance5: 11225
           <command>startup</command>
           <sbr>
           <arg>--force</arg>
+          <arg>--ignore-offline</arg>
           <sbr>
           <arg>--force-multiple</arg>
           <sbr>
@@ -1705,7 +1851,9 @@ instance5: 11225
 
         <para>
           Use <option>--force</option> to start even if secondary disks are
-          failing.
+          failing. <option>--ignore-offline</option> can be used to ignore
+          offline primary nodes and mark the instance as started even if
+          the primary is not available.
         </para>
 
         <para>
@@ -1761,6 +1909,7 @@ instance5: 11225
           <arg>--timeout=<replaceable>N</replaceable></arg>
           <sbr>
           <arg>--force-multiple</arg>
+          <arg>--ignore-offline</arg>
           <sbr>
           <group choice="opt">
             <arg>--instance</arg>
@@ -1811,6 +1960,12 @@ instance5: 11225
           <command>gnt-job info</command>.
         </para>
 
+        <para>
+          <option>--ignore-offline</option> can be used to ignore offline
+          primary nodes and force the instance to be marked as stopped. This
+          option should be used with care as it can lead to an
+          inconsistent cluster state.
+        </para>
 
         <para>
           Example:
@@ -2314,6 +2469,7 @@ node1.example.com:disk/1:/dev/drbd1
           <command>migrate</command>
           <arg>-f</arg>
           <arg>--non-live</arg>
+          <arg>--migration-mode=live|non-live</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
 
@@ -2330,21 +2486,27 @@ node1.example.com:disk/1:/dev/drbd1
         </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).
+          The <option>--non-live</option>
+          and <option>--migration-mode=non-live</option> options 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). The
+          option <option>--migration-mode=live</option> option will
+          request a fully-live migration. The default, when neither
+          option is passed, depends on the hypervisor parameters (and
+          can be viewed with the <command>gnt-cluster info</command>
+          command).
         </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
+          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