Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-1388

virtual fact is wrong sometimes when nested (vmware + lxc)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      RHEL 7, Puppet PC1

    • Template:
    • Team:
      Cloud & Container Management

      Description

      I have an systemd-nspawn container (lxc) running inside a vmware guest.

      vmware hypervisor -> vmware guest -> systemd-nspawn container

      When running inside the container, facter returns:

      -bash-4.2# facter virtual
      vmware
      

      virt-what returns

      -bash-4.2# /opt/puppetlabs/puppet/bin/virt-what 
      vmware
      lxc
      

      Unfortunately Facter is returning the first result in virt-what. https://github.com/puppetlabs/facter/blob/master/lib/src/facts/linux/virtualization_resolver.cc#L119

      IMO, the correct behavior would be to return the most specific result, which would be the container (lxc).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              pyther Matthew Gyurgyik
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support