lxc-clone.sgml.in revision 48e49f08c0f0d33d75e42cd1f6bf446f740fff8a
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amorelxc: linux Container library
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore(C) Copyright IBM Corp. 2007, 2008
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'AmoreDaniel Lezcano <daniel.lezcano at free.fr>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'AmoreThis library is free software; you can redistribute it and/or
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoremodify it under the terms of the GNU Lesser General Public
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'AmoreLicense as published by the Free Software Foundation; either
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoreversion 2.1 of the License, or (at your option) any later version.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'AmoreThis library is distributed in the hope that it will be useful,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amorebut WITHOUT ANY WARRANTY; without even the implied warranty of
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'AmoreMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'AmoreLesser General Public License for more details.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'AmoreYou should have received a copy of the GNU Lesser General Public
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'AmoreLicense along with this library; if not, write to the Free Software
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'AmoreFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'AmoreTranslated into Japanese
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoreby KATOH Yasufumi <karma at jazz.email.ne.jp>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore clone a new container from an existing one.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore 既存のコンテナからの新しいコンテナのクローン
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </refpurpose>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </refnamediv>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <refsynopsisdiv>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <cmdsynopsis>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <arg choice="opt">-B <replaceable>backingstore</replaceable></arg>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <arg choice="opt">-L <replaceable>fssize</replaceable></arg>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <arg choice="opt">-p <replaceable>lxcpath</replaceable></arg>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <arg choice="opt">-P <replaceable>newlxcpath</replaceable></arg>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <arg choice="req">-o <replaceable>orig</replaceable></arg>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <arg choice="req">-n <replaceable>new</replaceable></arg>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </cmdsynopsis>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <cmdsynopsis>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <arg choice="opt">-B <replaceable>backingstore</replaceable></arg>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <arg choice="opt">-L <replaceable>fssize</replaceable></arg>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <arg choice="opt">-p <replaceable>lxcpath</replaceable></arg>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <arg choice="opt">-P <replaceable>newlxcpath</replaceable></arg>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </cmdsynopsis>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </refsynopsisdiv>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <command>lxc-clone</command> Creates a new container as a clone of an existing
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore container. Two types of clones are supported: copy and snapshot. A copy
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore clone copies the root filessytem from the original container to the new. A
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore snapshot filesystem uses the backing store's snapshot functionality to create
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore a very small copy-on-write snapshot of the original container. Snapshot
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore clones require the new container backing store to support snapshotting. Currently
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore this includes only aufs, btrfs, lvm, overlayfs and zfs. LVM devices do not support
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore snapshots of snapshots.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <command>lxc-clone</command> は,新しいコンテナを既に存在するコンテナのクローンとして作製します.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore クローンは 2 つのタイプをサポートします: コピーとスナップショットです.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore コピータイプのクローンは元のコンテナから新しいコンテナへ root ファイルシステムをコピーします.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore スナップショットファイルシステムは,バッキングストアのスナップショット機能を使い,元のコンテナの非常に小さな copy-on-write でのスナップショットを作製します.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore スナップショットでのクローンは,新しいコンテナのバッキングストアとしてスナップショット機能のサポートが必要になります.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore 現時点では,このようなバッキングストアとしては aufs, btrfs, lvm, overlayfs, zfs のみをサポートします.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore LVM デバイスはスナップショットのスナップショットはサポートしていません.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore The backing store of the new container will be the same type as the
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore original container,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore with one exception: aufs and overlayfs snapshots can be created of directory backed
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore containers. This can be requested by using (for overlayfs) the <replaceable>-B overlayfs</replaceable>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore 新しいコンテナのバッキングストアは,元のコンテナのタイプと同じになります.ただし,ディレクトリバックエンドのコンテナのスナップショットを aufs もしくは overlayfs で作製することは可能です.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore 例えば,overlayfs の場合は <replaceable>-B overlayfs</replaceable> という引数を使って指定することが可能です.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore The names of the original and new container can be given (in that order)
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore after all options, or can be specified with the
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <replaceable>-o</replaceable> and <replaceable>-n</replaceable> options,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore respectively.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore 元のコンテナと新しいコンテナの名前は,全てのオプションの後に順番に与えることも,<replaceable>-o</replaceable> と <replaceable>-n</replaceable> オプションを使ってそれぞれ指定することも可能です.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <variablelist>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore The new container's rootfs should be a LVM or btrfs snapshot of the original.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore 新しいコンテナの rootfs は,オリジナルの LVM か btrfs のスナップショットになります.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore Do not change the hostname of the container (in the root
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore (root ファイルシステム内では) コンテナのホスト名を変更しません.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore Use the same MAC address as the original container, rather than
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore generating a new random one.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore 新しい MAC アドレスをランダムに生成せずに,元のコンテナと同じ MAC アドレスを使用します.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore Copy all mount hooks into the new container's directory, and
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore update any lxcpaths and container names as needed.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore 全てのマウントフックを新しいコンテナのディレクトリにコピーします.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore そして,lxcpath とコンテナ名を必要に応じて更新します.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <option>-L, --fssize <replaceable>fssize</replaceable></option>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore In the case of a block device backed container, a size for the new
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore block device. By default, the new device will be made the
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore same size as the original.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore ブロックデバイスのバックエンドのコンテナの場合,新しいブロックデバイスのサイズ.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore デフォルトでは,新しいデバイスは元のデバイスと同じサイズとなります.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <option>-p, --lxcpath <replaceable>fssize</replaceable></option>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore The lxcpath of the original container. By default, the system
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore wide configured lxcpath will be used.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore オリジナルのコンテナの lxcpath.デフォルトでは,システム全体で設定された lxcpath が使われます.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <option>-P, --newpath <replaceable>fssize</replaceable></option>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore The lxcpath for the new container. By default the same lxcpath
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore as the original will be used. Note that with btrfs snapshots,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore changing lxcpaths may not be possible, as subvolume snapshots
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore must be in the same btrfs filesystem.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore 新しいコンテナの lxcpath.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore デフォルトでは,オリジナルの lxcpath と同じものが使われます.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore btrfs のスナップショットの場合は注意が必要で,lxcpath の変更はできない可能性があります.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore これは subvolume のスナップショットが,同じ btrfs ファイルシステム上に存在しなければならないからです.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <option>-B, --backingstore <replaceable>fssize</replaceable></option>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore Select a different backing store for the new container. By
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore default the same as the original container's is used. Note that
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore currently changing the backingstore is only supported for
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore aufs and overlayfs snapshots of directory backed containers. Valid
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore backing stores include dir (directory), aufs, btrfs, lvm, zfs, loop
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore and overlayfs.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore 新しいコンテナで元のコンテナと違うバッキングストアを使う場合のバッキングストアを選択します.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore デフォルトでは元のコンテナと同じものが使われます.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore 現時点では,バッキングストアの変更は,ディレクトリバックエンドのコンテナに対する aufs と overlayfs のスナップショットに対してのみサポートされます.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore 有効なバッキングストアは dir(directory), aufs, btrfs, lvm, zfs, loop, overlayfs です.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <option>-o, --orig <replaceable>orig</replaceable></option>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore The name of the original container to clone.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore クローンしたい元のコンテナの名前.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <option>-n, --new <replaceable>new</replaceable></option>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore The name of the new container to create.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore 作製する新しいコンテナの名前.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </varlistentry>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore </variablelist>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore If the container being cloned has one or more <filename>lxc.hook.clone</filename>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore specified, then the specified hooks will be called for the new container. The
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore first 3 arguments passed to the clone hook will be the container name, a section
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore ('lxc'), and the hook type ('clone'). Extra arguments passed
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <command>lxc-clone</command> will be passed to the hook program starting at
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore argument 4. The <filename>LXC_ROOTFS_MOUNT</filename> environment variable gives
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore the path under which the container's root filesystem is mounted. The
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore configuration file pathname is stored in <filename>LXC_CONFIG_FILE</filename>, the
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore new container name in <filename>LXC_NAME</filename>, the old container name in
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <filename>LXC_SRC_NAME</filename>, and the path or device on which
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore the rootfs is located is in <filename>LXC_ROOTFS_PATH</filename>.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore クローンされるコンテナに 1 つ以上の <filename>lxc.hook.clone</filename> の指定が存在する場合,指定されたフックは新しいコンテナに対して呼ばれます.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore クローンフックに渡される最初の 3 つの引数は,コンテナ名,セクション ('lxc'),フックタイプ ('clone') となります.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <command>lxc-clone</command> に渡される追加の引数は,フックプログラムに渡される引数の 4 番目以降となります.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <filename>LXC_ROOTFS_MOUNT</filename> 環境変数には,コンテナの root ファイルシステムがマウントされるパスが与えられます.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore 設定ファイルのパス名は <filename>LXC_CONFIG_FILE</filename> に,新しいコンテナ名は <filename>LXC_NAME</filename>,古いコンテナ名は <filename>LXC_SRC_NAME</filename> に,rootfs のあるパスまたはデバイスは <filename>LXC_ROOTFS_PATH</filename> に保存されます.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore <para>Serge Hallyn <email>serge.hallyn@ubuntu.com</email></para>
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore<!-- Keep this comment at the end of the file
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'AmoreLocal variables:
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoresgml-omittag:t
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoresgml-shorttag:t
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoresgml-minimize-attributes:nil
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoresgml-always-quote-attributes:t
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoresgml-indent-step:2
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoresgml-indent-data:t
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoresgml-parent-document:nil
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoresgml-default-dtd-file:nil
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoresgml-exposed-tags:nil
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoresgml-local-catalogs:nil
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoresgml-local-ecat-files:nil