• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

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

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try:

uname -a
 
Sky Loi
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 28654
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for all replies. They are really helpful to me.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic