How can I determine whether the server is a virtual machine or a physical real machine?

Source: Internet
Author: User

How can I determine whether the server is a virtual machine or a physical real machine?
Dmidecode | grep-A20 "Memory Device $" | sed-n-e '/Locator/p'-e'/Size/P' | grep-v "Bank Locator"
View Memory Distribution
[Real machine] # dmidecode | grep-A20 "Memory Device $" | sed-n-e '/Locator/p'-e'/Size/P' | grep-v" bank Locator"
Size: 4096 MB
Locator: DIMM0
Size: 4096 MB
Locator: DIMM1
Size: 4096 MB
Locator: DIMM2
Size: 4096 MB
Locator: DIMM3


[Virtual Machine] # dmidecode | grep-A20 "Memory Device $" | sed-n-e '/Locator/p'-e'/Size/P' | grep-v "Bank locator"
Size: 1024 MB
Locator: RAM slot #0
Size: 512 MB
Locator: RAM slot #1
Size: 256 MB
Locator: RAM slot #2
Size: 128 MB
Locator: RAM slot #3
Size: 64 MB
Locator: RAM slot #4
Size: 16 MB
Locator: RAM slot #5
Size: No Module Installed
Locator: RAM slot #6
Size: No Module Installed
Locator: RAM slot #7
Size: No Module Installed
Locator: RAM slot #8
Size: No Module Installed
Locator: RAM slot #9
Size: No Module Installed
Locator: RAM slot #10
Size: No Module Installed
Locator: RAM slot #11
Size: No Module Installed
Locator: RAM slot #12
Size: No Module Installed
Locator: RAM slot #13
Size: No Module Installed
Locator: RAM slot #14

------- Uneven Memory Distribution


--- Directly view the product name
Dmidecode | grep "Product"


[Root @ lixora ~] # Dmidecode | grep "Product"
Product Name: VMware Virtual Platform
Product Name: paibx Desktop Reference Platform


[Root @ oracle sysbench-0.4.12] # dmidecode | grep "Product"
Product Name: System Product Name
Product Name: P8Z68-V LX


------ Observe the hardware device. If you see that the character similar to VMware is basically a virtual machine

[Virtual Machine] lspci-B | grep VMware
00:07. 7 System peripheral: VMware Virtual Machine Communication Interface (rev 10)
00: 0f. 0 VGA compatible controller: VMware svga ii Adapter
00:11. 0 PCI bridge: VMware PCI bridge (rev 02)
00:15. 0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15. 1 PCI bridge: VMware PCI Express Root Port (rev 01)
. 2 PCI bridge: VMware PCI Express Root Port (rev 01)
. 3 PCI bridge: VMware PCI Express Root Port (rev 01)

00:15. 4 PCI bridge: VMware PCI Express Root Port (rev 01)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.