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 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310
|
=encoding utf8
=head1 名前
guestfs-testing - manual testing of libguestfs, you can help!
=head1 説明
This page has manual tests you can try on libguestfs. Everyone has a
slightly different combination of platform, hardware and guests, so this
testing is very valuable. Thanks for helping out!
これらのテストは libguestfs E<ge> 1.14 が必要です。
Tests marked with a B<*> (asterisk) can B<destroy data> if you're not
careful. The others are safe and won't modify anything.
このリンクを使用して見つけたバグを報告できます:
https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
or post on the mailing list (registration is B<not> required, but if you're
not registered then you'll have to wait for a moderator to manually approve
your message):
https://www.redhat.com/mailman/listinfo/libguestfs
=head1 テスト
=head2 KVM アクセラレーションが使用されていることを確認します。
If your host has hardware virt acceleration, then with a hot cache
libguestfs should be able to start up in a few seconds. Run the following
command a few times:
time guestfish -a /dev/null run
After a few runs, the time should settle down to a few seconds (under 5
seconds on fast 64 bit hardware).
How to check for hardware virt:
http://virt-tools.org/learning/check-hardware-virt/
上のコマンドがまったく機能しなければ、 L<libguestfs-test-tool(1)> を使用します。
=head2 すべての仮想マシンにおいて virt-alignment-scan を実行します。
仮想マシンまたはディスクイメージにおいて L<virt-alignment-scan(1)> を実行します:
virt-alignment-scan -a /path/to/disk.img
または:
virt-alignment-scan -d Guest
Does the alignment report match how the guest partitions are aligned?
=head2 仮想マシンにあるいくつかのファイルにおいて virt-cat を実行します。
L<virt-cat(1)> は仮想マシンからファイルを表示できます。 Linux 仮想マシンに対しては、次を試します:
virt-cat LinuxGuest /etc/passwd
最近の機能は Windows のパスをサポートします、たとえば:
virt-cat WindowsGuest 'c:\windows\win.ini'
An even better test is if you have a Windows guest with multiple drives. Do
C<D:>, C<E:> etc paths work correctly?
=head2 B<*> Copy some files into a B<shut off> guest.
L<virt-copy-in(1)> can recursively copy files and directories into a guest
or disk image.
virt-copy-in -d Guest /etc /tmp
This should copy local directory C</etc> to C</tmp/etc> in the guest
(recursively). If you boot the guest, can you see all of the copied files
and directories?
Shut the guest down and try copying multiple files and directories:
virt-copy-in -d Guest /home /etc/issue /tmp
=head2 仮想マシンからいくつかのファイルをコピーします
L<virt-copy-out(1)> can recursively copy files and directories out of a
guest or disk image.
virt-copy-out -d Guest /home .
Note the final space and period in the command is not a typo.
This should copy C</home> from the guest into the current directory.
=head2 virt-df を実行します。
L<virt-df(1)> はディスク領域を一覧表示します。次を実行します:
virt-df
You can try comparing this to the results from L<df(1)> inside the guest,
but there are some provisos:
=over 4
=item *
The guest must be idle.
=item *
The guest disks must be synched using L<sync(1)>.
=item *
Any action such as booting the guest will write log files causing the
numbers to change.
=back
We don't guarantee that the numbers will be identical even under these
circumstances. They should be similar. It would indicate a bug if you saw
greatly differing numbers.
=head2 Try importing virt-df CSV output into a spreadsheet or database.
次を実行します:
virt-df --csv > /tmp/report.csv
Now try to load this into your favorite spreadsheet or database. Are the
results reproduced faithfully in the spreadsheet/database?
http://www.postgresql.org/docs/8.1/static/sql-copy.html
http://dev.mysql.com/doc/refman/5.1/en/load-data.html
=head2 B<*> B<シャットオフ>している仮想マシンにあるファイルを編集します。
L<virt-edit(1)> は仮想マシンにあるファイルを編集できます。RHEL または Fedora 仮想マシンにおいてこのコマンドを試します:
virt-edit LinuxGuest /etc/sysconfig/network
他の Linux 仮想マシンにおいて、次のように他のファイルの編集を試します:
virt-edit LinuxGuest /etc/motd
Are the changes seen inside the guest when it is booted?
=head2 仮想マシンにあるファイルシステム / パーティション / 論理ボリュームを表示します。
L<virt-filesystems(1)> can be used to display filesystems in a guest. Try
this command on any disk image or guest:
virt-filesystems -a /path/to/disk.img --all --long -h
または:
virt-filesystems -d Guest --all --long -h
Do the results match what is seen in the guest?
=head2 すべての仮想マシンにおいて virt-inspector を実行します。
Use L<virt-inspector(1)> to get a report on all of your guests or disk
images:
virt-inspector -a /path/to/disk.img | less
または:
virt-inspector -d Guest | less
Do the results match what is actually in the guest?
=head2 すべての仮想マシンにおいて virt-ls の監査機能を試します。
List all setuid or setgid programs in a Linux virtual machine:
virt-ls -lR -d Guest / | grep '^- [42]'
Linux 仮想マシンにあるすべての全体書き込み可能なディレクトリーを一覧表示します:
virt-ls -lR -d Guest / | grep '^d ...7'
Linux 仮想マシンにあるすべての Unix ドメインソケットを一覧表示します:
virt-ls -lR -d Guest / | grep '^s'
'.png' で終わるファイル名を持つすべての通常ファイルを表示するには:
virt-ls -lR -d Guest / | grep -i '^-.*\.png$'
ホームディレクトリーにある 10MB より大きなファイルを表示します:
virt-ls -lR -d Guest /home | awk '$3 > 10*1024*1024'
7日以内に変更されたものをすべて検索します:
virt-ls -lR -d Guest --time-days / | awk '$6 <= 7'
24時間以内に変更された通常のファイルを検索します:
virt-ls -lR -d Guest --time-days / | grep '^-' | awk '$6 < 1'
Do the results match what is in the guest?
=head2 tar ファイルからディスクイメージを作成します。
Use L<virt-make-fs(1)> to create a disk image from any tarball that you
happen to have:
virt-make-fs --partition=mbr --type=vfat /any/tarball.tar.gz output.img
'output.img' を既存の仮想マシンにローディスクとして追加します。仮想マシンがファイルを認識できるかを確認します。Windows
仮想マシンを試していると、このテストがとくに有用です。
他のパーティションスキーマを試してください。例: I<--partition=gpt>
他のファイルシステム形式を試してください。例: I<--type=ntfs>, I<--type=ext2>
=head2 B<*> B<停止状態>のディスクイメージまたは仮想マシンにおいて virt-rescue を実行します。
B<停止状態>の仮想マシンまたはディスクイメージを検査、復旧、または修復するには L<virt-rescue(1)> を使用します:
virt-rescue -a /path/to/disk.img
または:
virt-rescue -d Guest
仮想マシンを検査するために通常のシェルコマンドを使用できますか?
=head2 B<*> 仮想マシンの容量を変更します。
仮想マシンのディスク容量を大きくするために L<virt-resize(1)> を使用します。たとえば、ディスクイメージが 30G
より小さければ、次を実行して 30G に増やします:
truncate -s 30G newdisk.img
virt-filesystems -a /path/to/olddisk.img --all --long -h
virt-resize /path/to/olddisk.img newdisk.img --expand /dev/sda1
qemu-kvm -m 1024 -hda newdisk.img
仮想マシンがまだ起動しますか?他のパーティションの拡張を試します。
=head2 B<*> 仮想マシンのディスクをスパースにします。
L<virt-sparsify(1)> を使用して、ディスクイメージをよりスパースにします:
virt-sparsify /path/to/olddisk.img newdisk.img
Is C<newdisk.img> still bootable after sparsifying? Is the resulting disk
image smaller (use C<du> to check)?
=head2 B<*> B<停止状態>の Linux 仮想マシンを "sysprep" します。
Note that this really will mess up an existing guest, so it's better to
clone the guest before trying this.
virt-sysprep --hostname newhost.example.com -a /path/to/disk.img
sysprep が成功しましたか?起動後、何を変更しましたか、その変更は成功しましたか?
=head2 Windows ゲストから Windows レジストリをダンプします。
Windows 仮想マシンから Windows レジストリをダンプ出力するには L<virt-win-reg(1)> を使用します。
virt-win-reg --unsafe-printable-strings WindowsGuest 'HKLM\Software' |
less
virt-win-reg --unsafe-printable-strings WindowsGuest 'HKLM\System' |
less
Does the output match running C<regedit> inside the guest?
A recent feature is the ability to dump user registries, so try this,
replacing I<username> with the name of a local user in the guest:
virt-win-reg --unsafe-printable-strings WindowsGuest 'HKEY_USERS\username' |
less
=head1 関連項目
L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>,
L<http://libguestfs.org/>.
=head1 著者
Richard W.M. Jones (C<rjones at redhat dot com>)
=head1 COPYRIGHT
Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|