게시물 1,376건
   
명령어로 물리적인 서버 / 가상서버 확인방법
글쓴이 : 최고관리자 날짜 : 2017-09-14 (목) 14:34 조회 : 22270
글주소 :
                                


물리적인 서버 / 가상서버 확인방법

1. dmidecode
DMI table decoder
# apt-get install dmidecode

:: 실서버
# dmidecode -s system-manufacturer
System manufacturer

:: 가상서버
# dmidecode -s system-manufacturer
OpenStack Foundation

2.fecter
 - Gather system infomation
 - Collect and display facts about the system.
:: 실서버
# facter 2> /dev/null | grep virtual
is_virtual => false
virtual => physical

:: 가상서버
# facter 2> /dev/null | grep virtual
is_virtual => true
virtual => kvm

3. lshw
list hardware
:: 실서버
# lshw -class system
chonnom                   
    description: Desktop Computer
    product: System Product Name (To Be Filled By O.E.M.)
    vendor: System manufacturer
    version: System Version
    serial: System Serial Number
    width: 64 bits
    capabilities: smbios-2.5 dmi-2.5 vsyscall32
    configuration: boot=normal chassis=desktop family=To Be Filled By O.E.M. 
                         sku=To Be Filled By O.E.M. uuid=E0326F05-8EFE-D511-884B-F46D04D2EF96


:: 가상서버
# lshw -class system
mojily-3340               
    description: Computer
    product: OpenStack Nova
    vendor: OpenStack Foundation
    version: 13.1.2
    serial: 7147e77f-cc07-9fbc-1042-1c75580ef237
    width: 64 bits
    capabilities: smbios-2.8 dmi-2.8 vsyscall32
    configuration: boot=normal family=Virtual Machine uuid=7E7F3356-7641-D44E-AA09-7DBC84E85B0D

4. dmesg
print or control the kernel ring buffer
:: 실서버
#  dmesg  |grep "Hypervisor"

:: 가상서버
# dmesg  |grep "Hypervisor"
[    0.000000] Hypervisor detected: KVM

5. hostnamectl
- Control the system hostname
:: 실서버
# hostnamectl
   Static hostname: chonnom
   Pretty hostname: CHONNOM
         Icon name: computer-desktop
           Chassis: desktop
        Machine ID: c1b0b3f716774db991030221bf09c09f
           Boot ID: 07b97a3e6a6c43f3a137787bf42a79d7
  Operating System: Ubuntu 16.04.2 LTS
            Kernel: Linux 4.4.0-93-generic
      Architecture: x86-64

:: 가상서버
# hostnamectl
   Static hostname: mojily-3340
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 56337f7e41764ed4aa097dbc84e85b0d
           Boot ID: 90f2a54bfae4425fad11253d0fc45aa1
    Virtualization: kvm
  Operating System: Ubuntu 16.04.2 LTS
            Kernel: Linux 4.4.0-93-generic
      Architecture: x86-64

6. systemd-detect-virt
- Detect execution in a virtualized environment
:: 실서버 
# systemd-detect-virt
none

:: 가상서버 
 # systemd-detect-virt
kvm
그이외에도 imvirt(perl),  virt-what 명령어를 통해서도 가능합니다.



이름 패스워드
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

 



 
사이트명 : 모지리네 | 대표 : 이경현 | 개인커뮤니티 : 랭키닷컴 운영체제(OS) | 경기도 성남시 분당구 | 전자우편 : mojily골뱅이chonnom.com Copyright ⓒ www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.