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

facter does not detect systemd-nspawn virtualization

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:
    • Team:
      Platform OS
    • QA Risk Assessment:
      Needs Assessment

      Description

      facter seems to be unable to detect being run inside a systemd-nspawn container:

      `facter virtual` returns `physical`, `facter is_virtual` returns false.

      I digged a bit into virtualization_resolver.cc, it seems like facter is currently only guessing the container type (virtualization_resolver::get_cgroup_vm) by peeking into `/proc/1/cgroup`, but it's more complex than that.

      Probably facter should orientate more on the detect_container() method from systemd, to make the detection less error-prone.

      We could even use `systemd-detect-virt` if present.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              flokli Florian Klink
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support