virt-diff(1) | Virtualization Support | virt-diff(1) |
virt-diff - Differences between files in two virtual machines
virt-diff [--options] -d domain1 -D domain2 virt-diff [--options] -a disk1.img [-a ...] -A disk2.img [-A ...]
"virt-diff" lists the differences between files in two virtual machines or disk images. The usual use case is to show the changes in a VM after it has been running for a while, by taking a snapshot, running the VM, and then using this tool to show what changed between the new VM state and the old snapshot.
This tool will find differences in filenames, file sizes, checksums, extended attributes, file content and more from a virtual machine or disk image. However it does not look at the boot loader, unused space between partitions or within filesystems, "hidden" sectors and so on. In other words, it is not a security or forensics tool.
To specify two guests, you have to use the -a or -d option(s) for the first guest, and the -A or -D option(s) for the second guest. The common case is:
virt-diff -a old.img -A new.img
or using names known to libvirt:
virt-diff -d oldguest -D newguest
ディスクイメージの形式は自動検知されます。 これを上書きして強制的に特定の形式を使用する場合、 --format=.. オプションを使用します。
With no argument, this defaults to using md5. Using an argument, you can select the checksum type to use. If the flag is omitted then file times and size are used to determine if a file has changed.
ゲストのブロックデバイスを直接指定していると((-a))、libvirt は何も使用されません。
例:
virt-diff --format=raw -a disk.img [...]
forces raw format (no auto-detection) for disk.img.
virt-diff --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)。
Use the specified "KEY_STRING" as passphrase.
Note that if any such option is present on the command line, QEMU user networking will be automatically enabled for the libguestfs appliance.
If there are multiple encrypted devices then you may need to supply multiple keys on stdin, one per line.
Note that 0 in output means "up to 1 day before now", or that the age of the file is between 0 and 86399 seconds.
Comma-separated values (CSV) is a deceptive format. It seems like it should be easy to parse, but it is definitely not easy to parse.
神話: ただコンマで項目を区切る。 真実: これは正しく動き ません。この例は 2 つの列があります:
"foo,bar",baz
神話: 同時にファイルの 1 行を読み込みます。 真実: これは正しく動き ません。この例は 1 つの行があります:
"foo bar",baz
For shell scripts, use "csvtool" (https://github.com/Chris00/ocaml-csv also packaged in major Linux distributions).
For other languages, use a CSV processing library (eg. "Text::CSV" for Perl or Python’s built-in csv library).
Most spreadsheets and databases can import CSV directly.
このプログラムは、成功すると 0 を、エラーがあると 0 以外を返します。
guestfs(3), guestfish(1), virt-cat(1), virt-copy-out(1), virt-ls(1), virt-tar-out(1), http://libguestfs.org/.
Richard W.M. Jones http://people.redhat.com/~rjones/
Copyright (C) 2009-2023 Red Hat Inc.
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:
2024-10-03 | guestfs-tools-1.52.2 |