Linux.com

velusamyg

velusamyg

  • Linux.com Member
  • Posts: 1
  • Member Since: 05 Jan 12
  • Last Logged In: 05 Jan 12

Latest Posts

Posted by
Topic
Post Preview
Posted
  • velusamyg
    Runtime identification of virtualized environment
    I am a new to Linux/ Virtual Box. I am writing an application which is supposed be run on Virtualized env and also on standalone linux machines and the app is supposed to do different task based on the environment . I would like to identify on runtime, if my app is running on virtualized env (Virtual Box with guest OS as ubuntu and host OS as windows) OR if the app is running on standalone Linux (ubuntu) machine. Is there any env / config file within the ubuntu OS which will tell me the details required. Initially i considered, differentiation based on VBoxGuestAddition installable can help, but guestAddition installation is not mandatory on all VBox machine. Is there any alternate way for this identification. I am looking for some command or some unique file which will tell that my application is running in virtual box or not. Any help in this regard will be very helpful. Thanks,
    Link to this post 05 Jan 12

    I am a new to Linux/ Virtual Box. I am writing an application which is supposed be run on Virtualized env and also on standalone linux machines and the app is supposed to do different task based on the environment .

    I would like to identify on runtime, if my app is running on virtualized env (Virtual Box with guest OS as ubuntu and host OS as windows) OR if the app is running on standalone Linux (ubuntu) machine.

    Is there any env / config file within the ubuntu OS which will tell me the details required.

    Initially i considered, differentiation based on VBoxGuestAddition installable can help, but guestAddition installation is not mandatory on all VBox machine.

    Is there any alternate way for this identification.

    I am looking for some command or some unique file which will tell that my application is running in virtual box or not.

    Any help in this regard will be very helpful.

    Thanks,

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board