Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8678027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:36:29+00:00 2026-06-12T20:36:29+00:00

I don’t think the question needs any explanation. I’m writing a software that can

  • 0

I don’t think the question needs any explanation.
I’m writing a software that can boot virtual machines to simulate a network. I would like to disable this feature if the software is already running on a virtual machine.

I already read this post: How to detect if my application is running in a virtual machine?
But I need to do it on Linux and that post covers only Windows.

I’m tagging it as a Perl question as I’ve to do it in Perl, but probably there are some file in proc or somewhere else to check and it’s the same for all languages. I don’t know actually.

I’m interested in detecting mainly VirtualBox and KVM, as those are the VMs I’m using.

So, any suggestion?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T20:36:30+00:00Added an answer on June 12, 2026 at 8:36 pm

    I will talk specific to VMware and virtual Box Virtual Machines running Linux as guest Operating system.
    If you run below command, you will come to know that the underlying hardware is VMware/VirtualBox which certifies that it is a Virtual Machine.

    For VMware guest:

    # dmidecode  | grep -i product
            Product Name: VMware Virtual Platform
    

    For Virtual Box guest:

    # dmidecode  | grep -i product
        Product Name: VirtualBox
    

    “dmidecode” is a linux system command. You can have perl run dmidecode in the beginning of your script and extract the value. If it is a virtual machine then the script should exit without any further execution.

    I do not have any other hypervisor at my disposal to get you what above command return on them.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't think that I'm mad, I understand how php works! That being said. I
DON'T ASK WHY but... I have a regex that needs to be case insensitive
don't know what happened in my jcrop selection. I think I pressed some keys
Don't dismiss this as a newbie question! It's not, I'm not, I've tried everything,
Don't ask why, but is there any way to suppress a failed linking error?
Don't know the difference between the System.Window.Controls.TextBox and System.Windows.Forms.TextBox . Noticed that the System.Windows.Forms.TextBox
Don't know if anyone can help me with this or if it's even possible.
Don't be afraid to use any technical jargon or low-level explanations for things, please.
I don't know if this question is trivial or not. But after a couple
Don't know why this doesn't work. I can't do implicit animation for a newly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.