chiark / gitweb /
add REMOTE_ADDR and REMOTE_PORT for Accept=yes
[elogind.git] / man / machinectl.xml
index b50f03f36fdd998a960b120b4bb1c2215ccb3e28..7aeff686a062b4f5a77ee2a101458c4db1a843af 100644 (file)
         <term><command>set-limit</command> [<replaceable>NAME</replaceable>] <replaceable>BYTES</replaceable></term>
 
         <listitem><para>Sets the maximum size in bytes a specific
-        container or VM image, or all images may grow up to
-        (quota). Takes either one or two parameters. The first,
+        container or VM image, or all images may grow up to on disk
+        (disk quota). Takes either one or two parameters. The first,
         optional parameter refers to a container or VM image name. If
-        specified the size limit of the specified images is
-        changed. If omitted the overall size limit of the sum of all
-        images stored locally is changed. The final argument specifies
-        the size limit in bytes, possibly suffixed by the usual K, M,
-        G, T units. If the size limit shall be disabled, specify
-        <literal>-</literal> as size. This operation is currently only
-        supported on btrfs subvolume images.</para></listitem>
+        specified the size limit of the specified image is changed. If
+        omitted the overall size limit of the sum of all images stored
+        locally is changed. The final argument specifies the size
+        limit in bytes, possibly suffixed by the usual K, M, G, T
+        units. If the size limit shall be disabled, specify
+        <literal>-</literal> as size.</para>
+
+        <para>Note that per-container size limits are only supported
+        on btrfs file systems. Also note that if
+        <command>set-limit</command> is invoked without image
+        parameter, and <filename>/var/lib/machines</filename> is
+        empty, and the directory is not located on btrfs, a btrfs
+        loopback file is implicitly created as
+        <filename>/var/lib/machines.raw</filename> with the given
+        size, and mounted to
+        <filename>/var/lib/machines</filename>. The size of the
+        loopback may later be readjusted with
+        <command>set-limit</command>, as well. If such a
+        loopback-mounted <filename>/var/lib/machines</filename>
+        directory is used <command>set-limit</command> without image
+        name alters both the quota setting within the file system as
+        well as the loopback file and file system size
+        itself.</para></listitem>
       </varlistentry>
 
     </variablelist></refsect2>
         below.</para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><command>import-tar</command> <replaceable>FILE</replaceable> [<replaceable>NAME</replaceable>]</term>
+        <term><command>import-raw</command> <replaceable>FILE</replaceable> [<replaceable>NAME</replaceable>]</term>
+        <listitem><para>Imports a TAR or RAW container or VM image,
+        and places it under the specified name in
+        <filename>/var/lib/machines/</filename>. When
+        <command>import-tar</command> is used the file specified as
+        first argument should be a tar archive, possibly compressed
+        with xz, gzip or bzip2. It will then be unpacked into its own
+        subvolume in <filename>/var/lib/machines</filename>. When
+        <command>import-raw</command> is used the file should be a
+        qcow2 or raw disk image, possibly compressed with xz, gzip or
+        bzip2. If the second argument (the resulting image name) is
+        not specified it is automatically derived from the file
+        name. If the file name is passed as <literal>-</literal> the
+        image is read from standard input, in which case the second
+        argument is mandatory.</para>
+
+        <para>Similar as with <command>pull-tar</command>,
+        <command>pull-raw</command> the file system
+        <filename>/var/lib/machines.raw</filename> is increased in
+        size of necessary and appropriate. Optionally the
+        <option>--read-only</option> switch may be used to create a
+        read-only container or VM image. No cryptographic validation
+        is done when importing the images.</para>
+
+        <para>Much like image downloads, ongoing imports may be listed
+        with <command>list-transfers</command> and aborted with
+        <command>cancel-transfer</command>.</para></listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><command>list-transfers</command></term>
 
         <listitem><para>Shows a list of container or VM image
-        downloads that are currently in progress.</para></listitem>
+        downloads and imports that are currently in
+        progress.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><command>cancel-transfers</command> <replaceable>ID</replaceable>...</term>
 
-        <listitem><para>Aborts download of the container or VM image
-        with the specified ID. To list ongoing transfers and their
-        IDs, use <command>list-transfers</command>. </para></listitem>
+        <listitem><para>Aborts a download or import of the container
+        or VM image with the specified ID. To list ongoing transfers
+        and their IDs, use
+        <command>list-transfers</command>. </para></listitem>
       </varlistentry>
 
     </variablelist></refsect2>
     <filename>/var/lib/machines/</filename> to make them available for
     control with <command>machinectl</command>.</para>
 
+    <para>Note that many image operations are only supported,
+    efficient or atomic on btrfs file systems. Due to this, if the
+    <command>pull-tar</command>, <command>pull-raw</command>,
+    <command>pull-dkr</command>, <command>import-tar</command>,
+    <command>import-raw</command> and <command>set-limit</command>
+    commands notice that <filename>/var/lib/machines</filename> is
+    empty and not located on btrfs, they will implicitly set up a
+    loopback file <filename>/var/lib/machines.raw</filename>
+    containing a btrfs file system that is mounted to
+    <filename>/var/lib/machines</filename>. The size of this loopback
+    file may be controlled dynamically with
+    <command>set-limit</command>.</para>
+
     <para>Disk images are understood by
     <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     and <command>machinectl</command> in three formats:</para>