Detect when running under virtual machine
Project description
vmdetect
C++/python libraries and simple command line tool designed to detect when running under virtual machine.
Based on py_vmdetect sources from https://github.com/kepsic/py_vmdetect
Installation
Pre build packages
You can download installation package for supported linux distributions in Open Build Service
Examples:
Command line
vmdetect
echo $?
vmdetect -n
Bare Metal
vmdetect -i
0
Python
import virtualmachine
print(virtualmachine.name())
import virtualmachine
print(virtualmachine.id())
C++
#include <vmdetect/virtualmachine.h>
#include <iostream>
using namespace std;
int main(int argc, char **argv) {
VirtualMachine vm;
if(vm) {
cout << "Running on '" << vm << "' virtual machine" << endl;
return 1;
}
return 0;
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
virtualmachine-1.3.4.tar.gz
(64.1 kB
view details)
File details
Details for the file virtualmachine-1.3.4.tar.gz.
File metadata
- Download URL: virtualmachine-1.3.4.tar.gz
- Upload date:
- Size: 64.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c216d3360119d183e225b884d374a4712dce0bfe7b0ec2a2b264cf70e050dfdc
|
|
| MD5 |
628f82ca9f49e664e18ac866dfbf4d8f
|
|
| BLAKE2b-256 |
323a640c6250818698a9f8b6653312637dd5db4fc432f809edbeb5c6473b2930
|
Provenance
The following attestation bundles were made for virtualmachine-1.3.4.tar.gz:
Publisher:
publish.yml on PerryWerneck/vmdetect
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
virtualmachine-1.3.4.tar.gz -
Subject digest:
c216d3360119d183e225b884d374a4712dce0bfe7b0ec2a2b264cf70e050dfdc - Sigstore transparency entry: 163290926
- Sigstore integration time:
-
Permalink:
PerryWerneck/vmdetect@fe34c0b48ec733e99e2cca79213feb64f3435378 -
Branch / Tag:
refs/tags/1.3.4 - Owner: https://github.com/PerryWerneck
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fe34c0b48ec733e99e2cca79213feb64f3435378 -
Trigger Event:
push
-
Statement type: