1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
|
=head1 名前
virt-diff - Differences between files in two virtual machines
=head1 書式
virt-diff [--options] -d domain1 -D domain2
virt-diff [--options] -a disk1.img [-a ...] -A disk2.img [-A ...]
=head1 説明
C<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 B<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 I<-a> or I<-d> option(s) for the first guest, and the I<-A> or I<-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
=head1 オプション
=over 4
=item B<--help>
簡単なヘルプを表示します。
=item B<-a> file
=item B<--add> file
Add I<file> which should be a disk image from the first virtual machine. If the virtual machine has multiple block devices, you must supply all of them with separate I<-a> options.
ディスクイメージの形式は自動検知されます。 これを上書きして強制的に特定の形式を使用する場合、 I<--format=..> オプションを使用します。
=item B<-a> URI
=item B<--add> URI
リモートディスクを追加します。 L<guestfish(1)/リモートストレージの追加> 参照。
=item B<--all>
Same as I<--extra-stats> I<--times> I<--uids> I<--xattrs>.
=item B<--atime>
The default is to ignore changes in file access times, since those are unlikely to be interesting. Using this flag shows atime differences as well.
=item B<-A> file
=item B<-A> URI
Add a disk image from the second virtual machine.
__INCLUDE:blocksize-option.pod__
=item B<--checksum>
=item B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>
Use a checksum over file contents to detect when regular files have changed content.
With no argument, this defaults to using I<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.
=item B<-c> URI
=item B<--connect> URI
libvirt を使用していると、指定された I<URI> に接続します。 省略すると、デフォルトの libvirt ハイパーバイザーに接続します。
ゲストのブロックデバイスを直接指定していると((I<-a>))、libvirt は何も使用されません。
=item B<--csv>
Write out the results in CSV format (comma-separated values). This format can be imported easily into databases and spreadsheets, but read L</NOTE ABOUT CSV FORMAT> below.
=item B<--dir-links>
The default is to ignore changes in the number of links in directory entries, since those are unlikely to be interesting. Using this flag shows changes to the nlink field of directories.
=item B<--dir-times>
The default is to ignore changed times on directory entries, since those are unlikely to be interesting. Using this flag shows changes to the time fields of directories.
=item B<-d> guest
=item B<--domain> guest
Add all the disks from the named libvirt guest, as the first guest. Domain UUIDs can be used instead of names.
=item B<-D> guest
Add all the disks from the named libvirt guest, as the second guest. Domain UUIDs can be used instead of names.
=item B<--echo-keys>
When prompting for keys and passphrases, virt-diff 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.
=item B<--extra-stats>
Display extra stats.
=item B<--format=raw|qcow2|..>
=item B<--format>
The default for the I<-a>/I<-A> option is to auto-detect the format of the disk image. Using this forces the disk format for I<-a>/I<-A> options which follow on the command line. Using I<--format> with no argument switches back to auto-detection for subsequent I<-a>/I<-A> options.
例:
virt-diff --format=raw -a disk.img [...]
forces raw format (no auto-detection) for F<disk.img>.
virt-diff --format=raw -a disk.img --format -a another.img [...]
forces raw format (no auto-detection) for F<disk.img> and reverts to auto-detection for F<another.img>.
仮想マシンのディスクイメージが信頼できない raw 形式である場合、 ディスク形式を指定するためにこのオプションを使用すべきです。 これにより、悪意のある仮想マシンにより起こり得る セキュリティ問題を回避できます (CVE-2010-3851)。
=item B<-h>
=item B<--human-readable>
読みやすい形式でファイル容量を表示します。
__INCLUDE:key-option.pod__
__INCLUDE:keys-from-stdin-option.pod__
=item B<--times>
時間の項目を表示します。
=item B<--time-days>
Display time fields as days before now (negative if in the future).
Note that C<0> in output means "up to 1 day before now", or that the age of the file is between 0 and 86399 seconds.
=item B<--time-relative>
Display time fields as seconds before now (negative if in the future).
=item B<--time-t>
Display time fields as seconds since the Unix epoch.
=item B<--uids>
UID と GID の項目を表示します。
=item B<-v>
=item B<--verbose>
デバッグ用の冗長なメッセージを有効にします。
=item B<-V>
=item B<--version>
バージョン番号を表示して、終了します。
=item B<-x>
libguestfs API 呼び出しのトレースを有効にします。
=item B<--xattrs>
Display extended attributes.
=back
=head1 CSV 形式に関する注意
Comma-separated values (CSV) is a deceptive format. It I<seems> like it should be easy to parse, but it is definitely not easy to parse.
神話: ただコンマで項目を区切る。 真実: これは正しく動き I<ません>。この例は 2 つの列があります:
"foo,bar",baz
神話: 同時にファイルの 1 行を読み込みます。 真実: これは正しく動き I<ません>。この例は 1 つの行があります:
"foo
bar",baz
For shell scripts, use C<csvtool> (L<https://github.com/Chris00/ocaml-csv> also packaged in major Linux distributions).
For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl or Python’s built-in csv library).
Most spreadsheets and databases can import CSV directly.
=head1 終了ステータス
このプログラムは、成功すると 0 を、エラーがあると 0 以外を返します。
=head1 関連項目
L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-ls(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>.
=head1 著者
Richard W.M. Jones L<http://people.redhat.com/~rjones/>
=head1 COPYRIGHT
Copyright (C) 2009-2023 Red Hat Inc.
|