Description of problem: part-get-name give 'libguestfs: error: part_get_name: parted does not support the machine output (-m)' error message when run 'part-get-name /dev/sda 1' Version-Release number of selected component (if applicable): libguestfs-1.27.46-1.1.el7 How reproducible: 100% Steps to Reproduce: 1. Create a disk image: rhel6.6.img 2. #guestfish -a rhel6.6.img ><fs> run ><fs> list-devices /dev/sda ><fs> part-get-name /dev/sda 1 libguestfs: error: part_get_name: parted does not support the machine output (-m) More detail information: # export LIBGUESTFS_TRACE=1 # export LIBGUESTFS_DEBUG=1 #guestfish -a rhel6.6.img ><fs> run ><fs> list-devices /dev/sda ><fs> part-get-name /dev/sda 1 libguestfs: trace: part_get_name "/dev/sda" 1 guestfsd: main_loop: new request, len 0x38 parted -s -m /dev/null Error: The device /dev/null is so small that it cannot possibly store a file system or partition table. Perhaps you selected the wrong device? Warning: Error fsyncing/closing /dev/null: Invalid argument parted -m -- /dev/sda unit b print guestfsd: error: parted does not support the machine output (-m) guestfsd: main_loop: proc 416 (part_get_name) took 0.01 seconds libguestfs: trace: part_get_name = NULL (error) libguestfs: error: part_get_name: parted does not support the machine output (-m) Actual results: Get an error from command part-get-name: ><fs> part-get-name /dev/sda 1 libguestfs: error: part_get_name: parted does not support the machine output (-m) Expected results: No error message output like: libguestfs: error: part_get_name: parted does not support the machine output (-m) Additional info:
Upstream fix: https://github.com/libguestfs/libguestfs/commit/0fabe1a2ed82ff1df9feda459ae139bcca5a3338
Verified with libguestfs-1.28.1-1.2.el7 Steps to verify: #guestfish -a rhel.img ><fs> run ><fs> list-devices /dev/sda ><fs> part-get-name /dev/sda 1 libguestfs: error: part_get_name: part-get-name can only be used on GUID Partition Tables ><fs> guestfish give a proper error message, so bug is fixed.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0303.html