Convert UploadFile (and its callers) to new rpc
[ganeti-local] / man / gnt-instance.sgml
index c6c511c..2d9d44f 100644 (file)
         <cmdsynopsis>
           <command>add</command>
           <sbr>
-          <arg rep="repeat">--disk=<replaceable>N</replaceable>:size=<replaceable>VAL</replaceable><arg>,mode=<replaceable>ro|rw</replaceable></arg></arg>
+          <arg choice="req">-t<group choice="req">
+              <arg>diskless</arg>
+              <arg>file</arg>
+              <arg>plain</arg>
+              <arg>drbd</arg>
+            </group></arg>
+          <sbr>
+
+          <group choice="req">
+            <arg rep="repeat">--disk=<replaceable>N</replaceable>:size=<replaceable>VAL</replaceable><arg>,mode=<replaceable>ro|rw</replaceable></arg></arg>
+            <arg>-s <replaceable>SIZE</replaceable></arg>
+          </group>
           <sbr>
           <group>
             <arg rep="repeat">--net=<replaceable>N</replaceable><arg rep="repeat">:options</arg></arg>
             </group></arg>
           <sbr>
 
-          <arg choice="req">-t<group choice="req">
-              <arg>diskless</arg>
-              <arg>file</arg>
-              <arg>plain</arg>
-              <arg>drbd</arg>
-            </group></arg>
-          <sbr>
-
           <group choice="req">
             <arg>-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
             <arg>--iallocator <replaceable>name</replaceable></arg>
         </para>
 
         <para>
+          Alternatively, a single-disk instance can be created via the
+          <option>-s</option> option which takes a single argument,
+          the size of the disk. This is similar to the Ganeti 1.2
+          version (but will only create one disk).
+        </para>
+
+        <para>
           The minimum disk specification is therefore
-          <userinput>--disk 0:size=20G</userinput>, and a three-disk
-          instance can be specified as <userinput>--disk 0:size=20G
-            --disk 1:size=4G --disk 2:size=100G</userinput>.
+          <userinput>--disk 0:size=20G</userinput> (or <userinput>-s
+          20G</userinput> when using the <option>-s</option> option),
+          and a three-disk instance can be specified as
+          <userinput>--disk 0:size=20G --disk 1:size=4G --disk
+          2:size=100G</userinput>.
         </para>
 
         <para>
             </varlistentry>
 
             <varlistentry>
+              <term>kernel_args</term>
+              <listitem>
+                <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
+
+                <para>
+                  This options specifies extra arguments to the kernel
+                  that will be loaded.  device. This is always used
+                  for Xen PVM, while for KVM it is only used if the
+                  <option>kernel_path</option> option is also
+                  specified.
+                </para>
+
+                <para>
+                  The default setting for this value is simply
+                  <constant>"ro"</constant>, which mounts the root
+                  disk (initially) in read-only one. For example,
+                  setting this to <userinput>single</userinput> will
+                  cause the instance to start in single-user mode.
+                </para>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
               <term>initrd_path</term>
               <listitem>
                 <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
                   initrd to boot the instance with. Xen PVM instances
                   can use this always, while for KVM if this option is
                   only used if the <option>kernel_path</option> option
-                  is also specified.
+                  is also specified. You can pass here either an
+                  absolute filename (the path to the initrd) if you
+                  want to use an initrd, or use the format
+                  <userinput>no_initrd_path</userinput> for no initrd.
                 </para>
               </listitem>
             </varlistentry>
@@ -1083,14 +1121,17 @@ instance5: 11225
             <arg>-s</arg>
             <arg>--static</arg>
           </group>
-          <arg rep="repeat"><replaceable>instance</replaceable></arg>
+          <group choice="req">
+            <arg>--all</arg>
+            <arg rep="repeat"><replaceable>instance</replaceable></arg>
+          </group>
         </cmdsynopsis>
 
         <para>
-          Show detailed information about the (given) instances. This
-          is different from <command>list</command> as it shows
-          detailed data about the instance's disks (especially useful
-          for drbd disk template).
+          Show detailed information about the given instance(s). This is
+          different from <command>list</command> as it shows detailed data
+          about the instance's disks (especially useful for the drbd disk
+          template).
         </para>
 
         <para>
@@ -1098,6 +1139,11 @@ instance5: 11225
           available in the configuration file is returned, without
           querying nodes, making the operation faster.
         </para>
+
+        <para>
+          Use the <option>--all</option> to get info about all instances,
+          rather than explicitely passing the ones you're interested in.
+        </para>
       </refsect3>
 
       <refsect3>
@@ -1183,17 +1229,26 @@ instance5: 11225
         <cmdsynopsis>
           <command>reinstall</command>
           <arg choice="opt">-o <replaceable>os-type</replaceable></arg>
-          <arg choice="opt">-f <replaceable>force</replaceable></arg>
           <arg>--select-os</arg>
+          <arg choice="opt">-f <replaceable>force</replaceable></arg>
+          <arg>--force-multiple</arg>
+          <sbr>
+          <group choice="opt">
+            <arg>--instance</arg>
+            <arg>--node</arg>
+            <arg>--primary</arg>
+            <arg>--secondary</arg>
+            <arg>--all</arg>
+          </group>
           <arg>--submit</arg>
-          <arg choice="req"><replaceable>instance</replaceable></arg>
+          <arg choice="opt" rep="repeat"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
 
         <para>
-          Reinstalls the operating system on the given instance. The instance
-          must be stopped when running this command. If the
-          <option>--os-type</option> is specified, the operating system is
-          changed.
+          Reinstalls the operating system on the given instance(s). The
+          instance(s) must be stopped when running this command. If the
+          <option>--os-type</option> is specified, the operating
+          system is changed.
         </para>
 
         <para>
@@ -1203,6 +1258,19 @@ instance5: 11225
         </para>
 
         <para>
+          Since this is a potentially dangerous command, the user will
+          be required to confirm this action, unless the
+          <option>-f</option> flag is passed. When multiple instances
+          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>--force-multiple</option> options to skip the
+          interactive confirmation.
+        </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
@@ -1253,7 +1321,6 @@ instance5: 11225
         <cmdsynopsis>
           <command>startup</command>
           <sbr>
-          <arg>--extra=<replaceable>PARAMS</replaceable></arg>
           <arg>--force</arg>
           <sbr>
           <arg>--force-multiple</arg>
@@ -1266,6 +1333,9 @@ instance5: 11225
             <arg>--all</arg>
           </group>
           <sbr>
+          <arg>-H <option>key=value...</option></arg>
+          <arg>-B <option>key=value...</option></arg>
+          <sbr>
           <arg>--submit</arg>
           <sbr>
           <arg choice="opt"
@@ -1324,14 +1394,6 @@ instance5: 11225
         </para>
 
         <para>
-          The <option>--extra</option> option is used to pass
-          additional argument to the instance's kernel for this start
-          only. Currently there is no way to specify a persistent set
-          of arguments (beside the one hardcoded). Note that this may
-          not apply to all virtualization types.
-        </para>
-
-        <para>
           Use <option>--force</option> to start even if secondary disks are
           failing.
         </para>
@@ -1343,6 +1405,23 @@ instance5: 11225
         </para>
 
         <para>
+          The <option>-H</option> and <option>-B</option> options
+          specify extra, temporary hypervisor and backend parameters
+          that can be used to start an instance with modified
+          parameters. They can be useful for quick testing without
+          having to modify an instance back and forth, e.g.:
+          <screen>
+# gnt-instance start -H root_args="single" instance1
+# gnt-instance start -B memory=2048 instance2
+          </screen>
+          The first form will start the instance
+          <userinput>instance1</userinput> in single-user mode, and
+          the instance <userinput>instance2</userinput> with 2GB of
+          RAM (this time only, unless that is the actual instance
+          memory size already).
+        </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
@@ -1353,7 +1432,6 @@ instance5: 11225
           Example:
           <screen>
 # gnt-instance start instance1.example.com
-# gnt-instance start --extra single test1.example.com
 # gnt-instance start --node node1.example.com node2.example.com
 # gnt-instance start --all
           </screen>
@@ -1420,8 +1498,6 @@ instance5: 11225
         <cmdsynopsis>
           <command>reboot</command>
           <sbr>
-          <arg>--extra=<replaceable>PARAMS</replaceable></arg>
-          <sbr>
           <arg>--type=<replaceable>REBOOT-TYPE</replaceable></arg>
           <sbr>
           <arg>--ignore-secondaries</arg>
@@ -1524,6 +1600,7 @@ instance5: 11225
           <command>replace-disks</command>
           <arg>--submit</arg>
           <arg choice="req">-p</arg>
+          <arg>--disks <replaceable>idx</replaceable></arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
 
@@ -1531,6 +1608,7 @@ instance5: 11225
           <command>replace-disks</command>
           <arg>--submit</arg>
           <arg choice="req">-s</arg>
+          <arg>--disks <replaceable>idx</replaceable></arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
 
@@ -1546,16 +1624,22 @@ instance5: 11225
         </cmdsynopsis>
 
         <para>
-          This command is a generalized form for adding and replacing
-          disks. It is currently only valid for the mirrored (DRBD)
-          disk template.
+          This command is a generalized form for replacing disks. It
+          is currently only valid for the mirrored (DRBD) disk
+          template.
         </para>
 
         <para>
           The first form (when passing the <option>-p</option> option)
           will replace the disks on the primary, while the second form
           (when passing the <option>-s</option> option will replace
-          the disks on the secondary node.
+          the disks on the secondary node. For these two cases (as the
+          node doesn't change), it is possible to only run the replace
+          for a subset of the disks, using the option
+          <option>--disks</option> which takes a list of
+          comma-delimited disk indices (zero-based),
+          e.g. <userinput>0,2</userinput> to replace only the first
+          and third disks.
         </para>
 
         <para>