de-ibh / imvirt Goto Github PK
View Code? Open in Web Editor NEWdetects several virtualizations
Home Page: http://micky.ibh.net/~liske/imvirt.html
License: GNU General Public License v2.0
detects several virtualizations
Home Page: http://micky.ibh.net/~liske/imvirt.html
License: GNU General Public License v2.0
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
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.
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?
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
As discussed here. imvirt-report
On FreeBSD 10.3.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.