Issue #7723 has been updated by Andrew Elwell.

One option that may be investigating is using the work of rjones at redhat

http://people.redhat.com/~rjones/virt-what/


The snippet of code (shell) that they use to check is:

    # Check for Xen.
    if [ "$cpuid" = "XenVMMXenVMM" ]; then
        echo xen; echo xen-hvm
        skip_qemu_kvm=1
    elif [ -f $root/proc/xen/capabilities ]; then
        echo xen
        if grep -q "control_d" $root/proc/xen/capabilities; then
            echo xen-dom0
        else
            echo xen-domU
        fi
        skip_qemu_kvm=1
    elif [ -f $root/sys/hypervisor/type ] &&
        grep -q "xen" $root/sys/hypervisor/type; then
        # Ordinary kernel with pv_ops.  There does not seem to be
        # enough information at present to tell whether this is dom0
        # or domU.  XXX
        echo xen
    elif [ "$arch" = "ia64" ]; then
        if [ -d $root/sys/bus/xen -a ! -d $root/sys/bus/xen-backend ]; then
            # PV-on-HVM drivers installed in a Xen guest.
            echo xen
            echo xen-hvm
        else
            # There is no virt leaf on IA64 HVM.  This is a last-ditch
            # attempt to detect something is virtualized by using a
            # timing attack.
            virt-what-ia64-xen-rdtsc-test > /dev/null 2>&1
            case "$?" in
                0) ;; # not virtual
                1) # Could be some sort of virt, or could just be a bit slow.
                    echo virt
            esac
        fi
    fi


----------------------------------------
Bug #7723: virtual xenu incorrectly detected on newer kernels.
https://projects.puppetlabs.com/issues/7723

Author: Ken Bowley
Status: Investigating
Priority: Normal
Assignee: Jacob Helwig
Category: library
Target version: 
Keywords: 
Branch: 
Affected Facter version: 1.5.9


Newer mainline linux kernels have xen included, so testing for the existence of 
/sys/bus/xen will now give a false positive.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to