Description of problem: virt-inspector xpath query should output a neat format of the query element. This problem also exist in RHEL6.7 and RHEL7.1. Version-Release number of selected component (if applicable): libguestfs-tools-c-1.29.33-1.fc22.x86_64 How reproducible: 100% Steps to Reproduce: 1. Prepare a guest image, such as Fedora20 2. Run the following command: # virt-inspector -a Fedora-20.raw |virt-inspector --xpath '//mountpoints' <mountpoints> <mountpoint dev="/dev/fedora_dhcp-66-103-65/root">/</mountpoint> <mountpoint dev="/dev/sda1">/boot</mountpoint> </mountpoints> Actual results: As above Expected results: <mountpoints> <mountpoint dev="/dev/fedora_dhcp-66-103-65/root">/</mountpoint> <mountpoint dev="/dev/sda1">/boot</mountpoint> </mountpoints> Additional info: The output format is also not neat when query other elements, such as: filesystem, operatingsystem, etc.
There's probably a libxml2 flag we can use to format the output better. However the current output is correct.
Fixed upstream with https://github.com/libguestfs/libguestfs/commit/1f514f3466138b317028d5225ee53fe9cabfb9d7