File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to know the linux is running on a virtual server?

 
Sky Loi
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a remote linux server. What commands I could use to check if the linux is running on a virtual server? And the system resource allocation info for the virtual servers?

Thank you
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try:

uname -a
 
Sky Loi
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried it and it shows following:
Linux server-name 2.6.18-128.1.6.el5 #1 SMP Wed Apr 1 09:19:18 EDT 2009 i686 i686 i386 GNU/Linux

How can I see it is in VM or physical?

Thank you
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17639
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The whole point of a virtual machine is to make it as difficult as possible to distinguish between it and a real physical machine.

You may be able to see some differences in the DMESG boot report, since often the hardware virtualization isn't complete. Some things aren't actually necessary for each individual VM and can be handle by the VM host. Also, depending on the virtualization method used, there may be vm-assist packages installed, although that doesn't necessarily indicate that the machine is currently running virtualized. Other cues include doing an "ifconfig" and looking for virtual NICs.

Finally, a VM often shows less RAM and disk than a full physical machine, since you're usually using it for a specialized purpose and therefore don't need worst-case hardware. Instead you share the resources among VMs.
 
Sky Loi
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for all replies. They are really helpful to me.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic