bionic (1) virt-cat.1.gz

Provided by: libguestfs-tools_1.36.13-1ubuntu3.3_amd64 bug

名前

       virt-cat - 仮想マシンにあるファイルの表示

書式

        virt-cat [--options] -d domname file [file ...]

        virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]

       古い形式:

        virt-cat domname file

        virt-cat disk.img file

説明

       "virt-cat" は "file" の内容を表示するためにコマンドラインツールです。ここで "file" は仮想マシン (または
       ディスクイメージ) の中に存在します。

       Multiple filenames can be given, in which case they are concatenated together.  Each filename must be a
       full path, starting at the root directory (starting with '/').

       "virt-cat" can be used to quickly view a file.  To edit a file, use "virt-edit".  For more complex cases
       you should look at the guestfish(1) tool (see "USING GUESTFISH" below).

       Display /etc/fstab file from inside the libvirt VM called "mydomain":

        virt-cat -d mydomain /etc/fstab

       どのパッケージが最新インストールされたかを見つけるには:

        virt-cat -d mydomain /var/log/yum.log | tail

       どのユーザーが仮想マシンにログインしているかを見つけるには:

        virt-cat -d mydomain /var/run/utmp > /tmp/utmp
        who /tmp/utmp

       または、だれがログオンしたかを見つけるには:

        virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp
        last -f /tmp/wtmp

オプション

       --help
           簡単なヘルプを表示します。

       -a file
       --add file
           Add file which should be a disk image from a virtual machine.  If the virtual machine has multiple
           block devices, you must supply all of them with separate -a options.

           ディスクイメージの形式は自動検知されます。 これを上書きして強制的に特定の形式を使用する場合、
           --format=.. オプションを使用します。

       -a URI
       --add URI
           リモートディスクを追加します。 "リモートストレージの追加" in guestfish(1) 参照。

       -c URI
       --connect URI
           libvirt を使用していると、指定された URI に接続します。  省略すると、デフォルトの libvirt ハイパーバ
           イザーに接続します。

           ゲストのブロックデバイスを直接指定していると((-a))、libvirt は何も使用されません。

       -d guest
       --domain guest
           名前付きの libvirt 仮想マシンからすべてのディスクを追加します。  名前の代わりに仮想マシンの UUID を使
           用できます。

       --echo-keys
           キーやパスフレーズを入力するとき、通常 virt-cat はエコーを無効化します。 そのため、入力内容を確認でき
           ません。 テンペスト攻撃の心配がなく、 部屋に誰も居なければ、 入力内容を確認するためにこのフラグを指定
           できます。

       --format=raw|qcow2|..
       --format
           -a オプションは標準状態でディスクイメージの形式を自動検知します。 これを使用することにより、コマンド
           ラインで後続の -a オプションのディスク形式を強制的に指定できます。 引数なしで --format を使用すること
           により、 後続の -a オプションに対して自動検知に戻せます。

           例:

            virt-cat --format=raw -a disk.img file

           forces raw format (no auto-detection) for disk.img.

            virt-cat --format=raw -a disk.img --format -a another.img file

           forces raw format (no auto-detection) for disk.img and reverts to auto-detection for another.img.

           仮想マシンのディスクイメージが信頼できない raw 形式である場合、 ディスク形式を指定するためにこのオプ
           ションを使用すべきです。 これにより、悪意のある仮想マシンにより起こり得る セキュリティ問題を回避でき
           ます (CVE-2010-3851)。

       --keys-from-stdin
           Read key or passphrase parameters from stdin.  The default is to try to read passphrases from the
           user by opening /dev/tty.

       -m dev[:mountpoint[:options[:fstype]]]
       --mount dev[:mountpoint[:options[:fstype]]]
           指定されたマウントポイントにある、 名前付きパーティションまたは論理ボリュームをマウントします。

           If the mountpoint is omitted, it defaults to /.

           Specifying any mountpoint disables the inspection of the guest and the mount of its root and all of
           its mountpoints, so make sure to mount all the mountpoints needed to work with the filenames given as
           arguments.

           仮想マシンのディスクイメージに含まれるファイルシステムが不明な場合、 guestfish をこのオプションなしで
           実行することもできます。 そうすると、利用可能なパーティション、ファイルシステム、 論理ボリューム
           (LVM) の一覧が表示されます ("list-partitions", "list-filesystems", "lvs" コマンド参照)。 または、
           virt-filesystems(1) コマンドを使用することもできます。

           マウントパラメーターの三番目の (ほとんど使用されない) 項目は、 バックエンドのファイルシステムをマウン
           トするために使用される マウントオプションの一覧です。 これが指定されていない場合、 マウントオプション
           は空文字列または "ro" (--ro フラグが使用されている場合) になります。

            -m /dev/sda1:/:acl,user_xattr

           このフラグを使用することは、 "mount-options" コマンドを使用することと同等です。

           パラメーターの四番目の項目は使用するファイルシステムドライバー ("ext3" や "ntfs" など) です。 これは
           ほとんど必要ありません。 しかし、複数のドライバーがファイルシステムに対して有効である場合 (例: "ext2"
           と "ext3")、 または libguestfs がファイルシステムを誤検知している場合、 これは有用です。

       -v
       --verbose
           デバッグ用の冗長なメッセージを有効にします。

       -V
       --version
           バージョン番号を表示して、終了します。

       -x  libguestfs API 呼び出しのトレースを有効にします。

旧形式のコマンドライン引数

       以前のバージョンの virt-cat はどちらの書き込みもできます:

        virt-cat disk.img [disk.img ...] file

       または

        virt-cat guestname file

       whereas in this version you should use -a or -d respectively to avoid the confusing case where a disk
       image might have the same name as a guest.

       互換性のため古い形式がまだサポートされています。

LOG FILES

       To list out the log files from guests, see the related tool virt-log(1).  It understands binary log
       formats such as the systemd journal.

       To follow (tail) text log files, use virt-tail(1).

Windows のパス

       "virt-cat" has a limited ability to understand Windows drive letters and paths (eg. E:\foo\bar.txt).

       仮想マシンが Windows を実行している場合に限り:

       •   Drive letter prefixes like "C:" are resolved against the Windows Registry to the correct filesystem.

       •   Any backslash ("\") characters in the path are replaced with forward slashes so that libguestfs can
           process it.

       •   The path is resolved case insensitively to locate the file that should be displayed.

       There are some known shortcomings:

       •   Some NTFS symbolic links may not be followed correctly.

       •   NTFS junction points that cross filesystems are not followed.

guestfish の使用法

       guestfish(1) は "virt-cat" がうまく機能しないときに使用できる、より強力な、より低レベルなツールです。

       "virt-cat" を使用することは、次のこととほぼ同等です:

        guestfish --ro -i -d domname download file -

       ここで "domname" は libvirt 仮想マシンの名前です。また、"file" はファイルの完全パスです。最後の "-" ("標
       準出力に出力" を意味します) に注意してください。

       上のコマンドは libguestfs の仮想マシン検査機能を使用します。そのため、libguestfs が検査できない仮想マシン
       において、または仮想マシンを含んでいない任意のディスクイメージのようなものにおいて、うまく動作しませ
       ん。ディスクイメージから直接ファイルを表示するには、次を使用します:

        guestfish --ro -a disk.img -m /dev/sda1 download file -

       where disk.img is the disk image, /dev/sda1 is the filesystem within the disk image, and "file" is the
       full path to the file.

終了ステータス

       このプログラムは、成功すると 0 を、エラーがあると 0 以外を返します。

関連項目

       guestfs(3), guestfish(1), virt-copy-out(1), virt-edit(1), virt-log(1), virt-tail(1), virt-tar-out(1),
       http://libguestfs.org/.

著者

       Richard W.M. Jones http://people.redhat.com/~rjones/

       Copyright (C) 2010-2012 Red Hat Inc.

LICENSE

BUGS

       To get a list of bugs against libguestfs, use this link:
       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools

       To report a new bug against libguestfs, use this link:
       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools

       When reporting a bug, please supply:

       •   The version of libguestfs.

       •   Where you got libguestfs (eg. which Linux distro, compiled from source, etc)

       •   Describe the bug accurately and give a way to reproduce it.

       •   Run libguestfs-test-tool(1) and paste the complete, unedited output into the bug report.