X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=inspector%2Fvirt-inspector.pod;h=df9dfdad0ed1815f1518c12389ecb78047fde648;hb=4abb239dcc7b1d235783bb0b5e417c4b88b00fea;hp=2192b399f1cff5d6cf6da8446b807b26218807e7;hpb=87fb6d852db04d0d707e6587d4579d1cf2bd05ef;p=libguestfs.git diff --git a/inspector/virt-inspector.pod b/inspector/virt-inspector.pod index 2192b39..df9dfda 100755 --- a/inspector/virt-inspector.pod +++ b/inspector/virt-inspector.pod @@ -285,6 +285,27 @@ Note that this only covers permanent local filesystem mappings, not things like network shares. Furthermore NTFS volume mount points may not be listed here. +=head2 EiconE + +Virt-inspector is sometimes able to extract an icon or logo for the +guest. The icon is returned as base64-encoded PNG data. Note that +the icon can be very large and high quality. + + + + ... + + iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......] + [... many lines of base64 data ...] + + +To display the icon, you have to extract it and convert the base64 +data back to a binary file. Use an XPath query or simply an editor to +extract the data, then use the coreutils L program to do +the conversion back to a PNG file: + + base64 -i -d < icon.data > icon.png + =head2 INSPECTING INSTALL DISKS, LIVE CDs Virt-inspector can detect some operating system installers on @@ -308,22 +329,25 @@ installer, or one part of a multipart CD. For example: =head1 USING XPATH -You can use the XPath query language, and/or the xpath tool, in order -to select parts of the XML. +You can use the XPath query language to select parts of the XML. We +recommend using C to perform XPath queries from the +command line. For example: - $ virt-inspector -d Guest | xpath //filesystems - Found 1 nodes: - -- NODE -- + $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems' ext4 - [etc] + [...] + + $ virt-inspector -d Guest | \ + xmlstarlet sel -t -c "string(//filesystem[@dev='/dev/sda1']/type)" + ext4 $ virt-inspector -d Guest | \ - xpath "string(//filesystem[@dev='/dev/sda1']/type)" - Query didn't return a nodeset. Value: ext4 + xmlstarlet sel -t -v '//icon' | base64 -i -d | display - + [displays the guest icon, if there is one] =head1 SHELL QUOTING @@ -348,11 +372,18 @@ versions of virt-inspector with different names: virt-inspector Old Perl version. virt-inspector2 New C version. +=head1 EXIT STATUS + +This program returns 0 if successful, or non-zero if there was an +error. + =head1 SEE ALSO L, L, L, +L, +L, L. =head1 AUTHORS