Skip to main content

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

Platform: Linux/Windows License: GPL v3 CodeQL build result PyPI version

Installation

Pre build packages

You can download installation package for supported linux distributions in Open Build Service

Download from open build service Download from githut Download from pypi

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.3.tar.gz (64.2 kB view details)

Uploaded Source

File details

Details for the file virtualmachine-1.3.3.tar.gz.

File metadata

  • Download URL: virtualmachine-1.3.3.tar.gz
  • Upload date:
  • Size: 64.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for virtualmachine-1.3.3.tar.gz
Algorithm Hash digest
SHA256 40bf132886f5db9139524f70b2262cd8190866fca6310996e5c9f75d1a036cf6
MD5 f595a06c8505e47380eff23dba7a4775
BLAKE2b-256 f2bb1dfb749005aaa18593b0878a9a3270d27f1e22d810b8728b6795c1133ff4

See more details on using hashes here.

Provenance

The following attestation bundles were made for virtualmachine-1.3.3.tar.gz:

Publisher: publish.yml on PerryWerneck/vmdetect

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page