Scroll to navigation

virt-log(1) Virtualization Support virt-log(1)

名前

virt-log - Display log files from a virtual machine

書式

 virt-log [--options] -d domname
 virt-log [--options] -a disk.img [-a disk.img ...]

説明

"virt-log" is a command line tool to display the log files from the named virtual machine (or disk image).

This tool understands and displays both plain text log files (eg. /var/log/messages) and binary formats such as the systemd journal.

To display other types of files, use virt-cat(1). To follow (tail) text log files, use virt-tail(1). To copy files out of a virtual machine, use virt-copy-out(1). To display the contents of the Windows Registry, use virt-win-reg(1).

Display the complete logs from a guest:

 virt-log -d mydomain | less

仮想マシンが取得している DHCP IP アドレスを発見するには:

 virt-log -d mydomain | grep 'dhclient.*bound to'

オプション

簡単なヘルプを表示します。
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=.. オプションを使用します。

リモートディスクを追加します。 "リモートストレージの追加" in guestfish(1) 参照。
This parameter sets the sector size of the disk image. It affects all explicitly added subsequent disks after this parameter. Using --blocksize with no argument switches the disk sector size to the default value which is usually 512 bytes. See also "guestfs_add_drive_opts" in guestfs(3).
libvirt を使用していると、指定された URI に接続します。 省略すると、デフォルトの libvirt ハイパーバイザーに接続します。

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

名前付きの libvirt 仮想マシンからすべてのディスクを追加します。 名前の代わりに仮想マシンの UUID を使用できます。
When prompting for keys and passphrases, virt-log normally turns echoing off so you cannot see what you are typing. If you are not worried about Tempest attacks and there is no one else in the room you can specify this flag to see what you are typing.
-a オプションは標準状態でディスクイメージの形式を自動検知します。 これを使用することにより、コマンドラインで後続の -a オプションのディスク形式を強制的に指定できます。 引数なしで --format を使用することにより、 後続の -a オプションに対して自動検知に戻せます。

例:

 virt-log --format=raw -a disk.img
    

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

 virt-log --format=raw -a disk.img --format -a another.img
    

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

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

Specify a key for LUKS, to automatically open a LUKS device when using the inspection. "ID" can be either the libguestfs device name, or the UUID of the LUKS device.
Use the specified "KEY_STRING" as passphrase.
Read the passphrase from FILENAME.
Read key or passphrase parameters from stdin. The default is to try to read passphrases from the user by opening /dev/tty.

If there are multiple encrypted devices then you may need to supply multiple keys on stdin, one per line.

デバッグ用の冗長なメッセージを有効にします。
バージョン番号を表示して、終了します。
libguestfs API 呼び出しのトレースを有効にします。

終了ステータス

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

関連項目

guestfs(3), guestfish(1), virt-cat(1), virt-copy-out(1), virt-tail(1), virt-tar-out(1), virt-win-reg(1), http://libguestfs.org/.

著者

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

COPYRIGHT

Copyright (C) 2010-2020 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.
2021-03-31 libguestfs-1.44.2