[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 438
  • Last Modified:

Linux - how to distinguish between dedicated server from VPS or cloud?

How to distinguish between physical (dedicated) server from VPS or cloud?

Which utility can give me such information? Or maybe system call and so on?
0
longjumps
Asked:
longjumps
  • 3
  • 3
  • 2
  • +1
3 Solutions
 
PapertripCommented:
Your question isn't very clear.

VPS -- dedicated machine (could be physical or virtual)
Cloud -- a cluster of machines that act as a single server

However, these days the term "Cloud" is so abused and misused that who knows what is really on the other end of any "Cloud" services.
0
 
PapertripCommented:
I should clarify, that technically a VPS is a virtual server, but it really depends on how your provider has it all setup, contact them.
0
 
longjumpsAuthor Commented:
The question is really the following.

Let's say I am working inside of some Windows Server.
How can I know if it is physical, VPS or cloud?

Is the some definitions of utility to be run that can tell me where am I?
0
Will You Be GDPR Compliant by 5/28/2018?

GDPR? That's a regulation for the European Union. But, if you collect data from customers or employees within the EU, then you need to know about GDPR and make sure your organization is compliant by May 2018. Check out our preparation checklist to make sure you're on track today!

 
longjumpsAuthor Commented:
I mean in Linux.

The question is really the following.

Let's say I am working inside of some Linux Server.
How can I know if it is physical, VPS or cloud?

Is the some definitions or utility to be run that can tell me where am I?
0
 
mchkorgCommented:
Hi
Probably with lshw or lspci and a bit of grep to get, for example, your motherboard manufacturer.

I've tested on a virtual Debian, running on VMware ESXi, and on a physical one

# lshw | grep vendor

returns either : "Supermicro" or "VMware, Inc".
Guess which one is virtual :)

0
 
mchkorgCommented:
You can elaborate, based on this, to get the information.
Not an automatic way, but I guess you just have to check for some servers, one time.
0
 
longjumpsAuthor Commented:
Thanks for information.

These commands are supposed to be run from "root" account.
Also they are using /dev/mem

Is there something that can be run from regular and not using  /dev/mem?
0
 
mchkorgCommented:
None that I'm aware of.
Some files are readable in /proc and might contain the information you need, but I doubt it.
lshw is just some sort of a frontend for these information.

dmesg is unreadable for non-root, also



A intermediate solution would be to have a sudo privilege for lshw only. If you can't get root access but the root user can give you lshw via sudo.

No other idea, sorry
0
 
PsiCopCommented:
Look at my EE Profile for a link to my personal website.

On my Projects page, currently up at the top, is a link to my paper entitled Probing System Hardware in Linux. Read that - it includes how to differentiate an OS running directly on physical hardware vs. virtualized.

If you have any questions after reading that, let me know.
0

Featured Post

Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now