Bug 1171666

Summary: inspection thinks EFI partition is a separate operating system
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED RAWHIDE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mbooth, ptoscano, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-09 17:28:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard W.M. Jones 2014-12-08 10:39:35 UTC
Description of problem:

(Bug found by Laszlo Ersek)

When using libguestfs inspection (eg. virt-inspector) on an EFI
disk image, libguestfs thinks that the first partition is a
separate operating system.

As a result, many other virt tools (eg. virt-cat) refuse to
operate properly on these disk images.

$ virt-inspector -a disk.img
<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/sda1</root>
    <major_version>0</major_version>
    <minor_version>0</minor_version>
    <format>installer</format>
    <mountpoints>
      <mountpoint dev="/dev/sda1">/</mountpoint>
    </mountpoints>
    <filesystems>
      <filesystem dev="/dev/sda1">
        <type>vfat</type>
        <uuid>BEB0-02B2</uuid>
      </filesystem>
    </filesystems>
    <applications/>
  </operatingsystem>
  <operatingsystem>
    <root>/dev/sda4</root>
    <name>linux</name>
    <arch>aarch64</arch>
    <distro>rhel</distro>
    <product_name>[product name hidden]</product_name>
    <major_version>1</major_version>
    <minor_version>6</minor_version>
    <package_format>rpm</package_format>
    <package_management>up2date</package_management>
    <format>installed</format>
    <mountpoints>
      <mountpoint dev="/dev/sda4">/</mountpoint>
      <mountpoint dev="/dev/sda2">/boot</mountpoint>
      <mountpoint dev="/dev/sda1">/boot/efi</mountpoint>
    </mountpoints>
    <filesystems>
      <filesystem dev="/dev/sda1">
        <type>vfat</type>
        <uuid>BEB0-02B2</uuid>
      </filesystem>
      <filesystem dev="/dev/sda2">
        <type>xfs</type>
        <label>boot</label>
        <uuid>45702390-5981-46a2-bbd5-c9828297540a</uuid>
      </filesystem>
      <filesystem dev="/dev/sda3">
        <type>swap</type>
        <label>swap</label>
        <uuid>da11569a-7639-4d9a-8e1c-e7b7d98a71e4</uuid>
      </filesystem>
      <filesystem dev="/dev/sda4">
        <type>xfs</type>
        <label>rootfs</label>
        <uuid>8c854adf-8656-43e5-8a09-eaa776708f16</uuid>
      </filesystem>
    </filesystems>
    <applications>
...
    </applications>
  </operatingsystem>
</operatingsystems>


Version-Release number of selected component (if applicable):

libguestfs-1.29.13-1.fc22.x86_64

How reproducible:

100%

Steps to Reproduce:
1. See above.

Comment 2 Richard W.M. Jones 2014-12-09 14:19:18 UTC
Patch posted:

https://www.redhat.com/archives/libguestfs/2014-December/msg00084.html