Giter Site home page Giter Site logo

de-ibh / imvirt Goto Github PK

View Code? Open in Web Editor NEW
44.0 9.0 10.0 2.56 MB

detects several virtualizations

Home Page: http://micky.ibh.net/~liske/imvirt.html

License: GNU General Public License v2.0

Shell 28.98% C 11.37% C++ 1.36% Perl 58.29%
perl virtualization detection heuristic

imvirt's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imvirt's Issues

new release version (git tag)

Hey,
the last release (git tag) was done around 2013. There has happened some smaller changes in the meanwhile, maybe its time for another tag? 😋
cheers

xen detection broken

Using PVHVM (but was also broken with PV, just don't have the data anymore). Using packages from debian stable.

I know about #15, tried patching it locally - usually the output is Unknown, sometimes it picks Xen PV. When I tried fixing the sort locally the output is always Unknown.

Maybe http://www.brendangregg.com/blog/2014-05-09/xen-feature-detection.html is useful.

Bit 11 (0x800) in /sys/hypervisor/properties/features marks dom0 vs domU (when /sys/hypervisor/type is xen).

Intel(R) Xeon(R) CPU E5-2609 0 @ 2.40GHz

# imvirt -d
[...]
$VAR1 = {
          'Xen HVM 4.8' => '0.447761194029851',
          'Xen PV' => '0.537313432835821',
          'Physical' => '0.0149253731343284'
        };
[...]

# /usr/lib/imvirt/hvm
XenVMMXenVMM
# /usr/lib/imvirt/xen
HVM 4.8
# cat /sys/hypervisor/type
xen
# cat /sys/hypervisor/properties/features
00002705
# dmesg | grep 'Xen HVM'
[    0.000000] DMI: Xen HVM domU, BIOS 4.8.3-pre 11/25/2017
[    0.000000] Booting paravirtualized kernel on Xen HVM
[    0.000000] xen:events: Xen HVM callback vector for event delivery is enabled

Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz

# imvirt -d
[...]
$VAR1 = {
          'Xen PV' => '0.556701030927835',
          'Physical' => '0.0103092783505155',
          'Xen HVM 4.8' => '0.43298969072165'
        };
[...]

# /usr/lib/imvirt/hvm 
XenVMMXenVMM
# /usr/lib/imvirt/xen
HVM 4.8
# cat /sys/hypervisor/type
xen
# cat /sys/hypervisor/properties/features
00002705
# dmesg | grep 'Xen HVM'
[    0.000000] DMI: Xen HVM domU, BIOS 4.8.3-pre 11/25/2017
[    0.000000] Booting paravirtualized kernel on Xen HVM
[    0.000000] xen:events: Xen HVM callback vector for event delivery is enabled

Running imvirt multiple times results in unstable and incorrect output

Running imvirt multiple times results in unstable and incorrect output on some KVM virtual machines. Example output:

$ imvirt
Unknown
$ imvirt
KVM
$ imvirt
Unknown
$ imvirt
KVM
$ imvirt
KVM
$ imvirt
Unknown

The correct answer is KVM

Probably interesting part of imvirt-report:

Good:

$VAR1 = {
   'KVM' => '0.653333333333333',
   'Physical' => '0.0133333333333333',
   'lguest' => '0.333333333333333'
 };

ImVirt: imv_get: m = 0.333333333333333
ImVirt: imv_get: s² = 0.1024
ImVirt: imv_get: 0.653333333333333 - sqrt(0.1024) > 0.0133333333333333
KVM

vs.

Bad:

ImVirt: imvirt_detect():
$VAR1 = {
   'lguest' => '0.333333333333333',                             
   'Physical' => '0.0133333333333333',
   'KVM' => '0.653333333333333'
 };

ImVirt: imv_get: m = 0.333333333333333                                 
ImVirt: imv_get: s² = 0.1024
ImVirt: imv_get: 0.653333333333333 - sqrt(0.1024) > 0.333333333333333  
Unknown

This is seconds later on the same machine.

Any ideas?

Broken portability

As per ./PORTABLE.md the imvirt-bundle should just run as an executeable, but apparently it does require some dependencies still, as it complains about it:

./imvirtp-bundle 

Attempt to reload DynaLoader.pm aborted.

Compilation failed in require at /usr/share/perl/5.14/XSLoader.pm line 99.

Compilation failed in require at /usr/lib/perl/5.14/IO/Handle.pm line 9.

BEGIN failed--compilation aborted at /usr/lib/perl/5.14/IO/Handle.pm line 9.

Compilation failed in require at /usr/lib/perl/5.14/IO/Seekable.pm line 9.

BEGIN failed--compilation aborted at /usr/lib/perl/5.14/IO/Seekable.pm line 9.

Compilation failed in require at /usr/lib/perl/5.14/IO/File.pm line 11.

BEGIN failed--compilation aborted at /usr/lib/perl/5.14/IO/File.pm line 11.

Compilation failed in require at /usr/bin/par-archive line 354.

It was run on Ubuntu Desktop 22.04.2 LTS [amd64, minimal install] in Gnome Terminal under user privilegues.
Version is v0.9.6.

Ideally I'd look for a self-contained executeable with no dependencies even if that creates a bigger file.

Please let me know if I can be of any assistance in fixing it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.