[systemd-bugs] [Bug 61491] New: systemd-detect-virt and hostnamectl fail to detect Xen PV

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Feb 26 00:29:52 PST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=61491

          Priority: medium
            Bug ID: 61491
          Assignee: systemd-bugs at lists.freedesktop.org
           Summary: systemd-detect-virt and hostnamectl fail to detect Xen
                    PV
        QA Contact: systemd-bugs at lists.freedesktop.org
          Severity: minor
    Classification: Unclassified
                OS: Linux (All)
          Reporter: andy.melnikov at gmail.com
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: general
           Product: systemd

When running inside a Xen PV virtual machine, systemd-detect-virt displays
"none" and hostnamectl doesn't display "Virtualization" line:

[root at foo ~]# systemd-detect-virt
none

[root at foo ~]# hostnamectl
   Static hostname: foo
   Pretty hostname: foo
         Icon name: computer
           Chassis: n/a
        Machine ID: baad787b99df4cc7a8ff801dfd96c735
           Boot ID: baad822deca749a496ee91406681ebd6
  Operating System: Foo Linux
            Kernel: Linux 3.x.x-foo
      Architecture: i686


Compare with running in vmware:

[root at bar ~]# systemd-detect-virt
vmware
[root at bar ~]# hostnamectl
   Static hostname: bar
Transient hostname: localhost
   Pretty hostname: n/a
         Icon name: computer-vm
           Chassis: vm
        Machine ID: d2016ade07564ecfb465fa009630602e
           Boot ID: 09105e4eea624316a8eda284739dcc45
    Virtualization: vmware
  Operating System: Foo Linux
            Kernel: Linux 3.x.x-foo
      Architecture: i686

One way to detect is to look for presense of /sys/hypervisor/type:

[root at zorro ~]# cat /sys/hypervisor/type
xen

Or /proc/xen/ folder.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20130226/21474121/attachment.html>


More information about the systemd-bugs mailing list