- 리눅스 자신이 VM인지 아닌지 확인
- 리눅스 VM 하이퍼바이저 확인
- Guest OS 여부 확인
1 방법 1: virt-what ★[ | ]

Console
Copy
[root@zetawiki ~]# virt-what
kvm
Console
Copy
[root@zetawiki ~]# virt-what
vmware
Console
Copy
[root@zetawiki ~]# virt-what
xen
xen-domU
Console
Copy
[root@zetawiki ~]# virt-what
hyperv
2 방법 2: lscpu ★[ | ]
Console
Copy
[root@zetawiki ~]# lscpu | grep Hypervisor
Hypervisor vendor: KVM
Console
Copy
[root@zetawiki02 ~]# lscpu | grep Hypervisor
Hypervisor vendor: Xen
Console
Copy
[root@zetawiki02 ~]# lscpu | grep Hypervisor
Hypervisor vendor: Microsoft
3 방법 3: dmidecode[ | ]

Bash
Copy
dmidecode | head -5
Bash
Copy
dmidecode -s system-product-name
실행예시 (Xen VM)
Console
Copy
[root@zetawiki ~]# dmidecode | head -5
/dev/mem: mmap: Bad address
# dmidecode 2.10
Console
Copy
[root@zetawiki ~]# dmidecode | head -5
# dmidecode 2.11
# No SMBIOS nor DMI entry point found, sorry.
실행예시 (KVM)
Console
Copy
[root@zetawiki ~]# dmidecode -s system-product-name
KVM
실행예시 (VMware VM)
Console
Copy
[root@zetawiki ~]# dmidecode | head -5
# dmidecode 2.11
SMBIOS 2.4 present.
364 structures occupying 14150 bytes.
Table at 0x000E0010.
Console
Copy
[root@zetawiki ~]# dmidecode -s system-product-name
VMware Virtual Platform
실행예시 (berametal)
Console
Copy
[root@zetawiki ~]# dmidecode | head -5
# dmidecode 2.10
SMBIOS 2.6 present.
308 structures occupying 8320 bytes.
Table at 0x7F7FD000.
- → 단독서버의 경우
실행예시 (XenServer)
Console
Copy
[root@zetawiki ~]# dmidecode | head -5
# dmidecode 2.7
SMBIOS 2.7 present.
127 structures occupying 3808 bytes.
Table at 0xDF7FE000.
- → 하이퍼바이저의 경우
4 방법 4: ethtool[ | ]
KVM
Console
Copy
[root@zetawiki ~]# ethtool -i eth0 | grep driver
driver: virtio_net
Xen VM
Console
Copy
[root@zetawiki ~]# ethtool -i eth0 | grep driver
driver: netfront
VMware VM
Console
Copy
[root@zetawiki ~]# ethtool -i eth0 | grep driver
driver: e1000
5 방법 5: fdisk[ | ]
Xen VM
Console
Copy
[root@zetawiki ~]# fdisk -l
Disk /dev/xvda: 31.4 GB, 31457280000 bytes
255 heads, 63 sectors/track, 3824 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 13 104391 83 Linux
/dev/xvda2 14 3824 30611857+ 8e Linux LVM
KVM
Console
Copy
[root@zetawiki ~]# fdisk -l
Disk /dev/vda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/vda1 * 1 13 104391 83 Linux
/dev/vda2 14 5221 41833260 8e Linux LVM
VMware VM, HyperV VM
Console
Copy
[root@zetawiki ~]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 38 305203+ 83 Linux
/dev/sda2 39 2353 18595237+ 83 Linux
/dev/sda3 2354 2610 2064352+ 82 Linux swap / Solaris
- → VM이지만 sda로 나오므로 확인 어려움
6 같이 보기[ | ]
편집자 Jmnote 180.70.118.243 Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.
- 분류 댓글:
- 리눅스 (19)
CentOS JDK 설치 ― …CentOS JDK 설치 ― ElliottCentOS vsftpd 설치 및 설정 ― …CentOS에서 apt-get 실행해보기 ― …CentOS에서 apt-get 실행해보기 ― 다미안VirtualBox 리눅스 인터넷 연결 ― …VirtualBox 리눅스 인터넷 연결 ― JmnoteVirtualBox 리눅스 인터넷 연결 ― …리눅스 CPU 사용률 확인 ― 동원잉리눅스 JDK 버전 확인 ― …리눅스 JDK 버전 확인 ― Jmnote리눅스 SSH 패스워드 없이 자동 로그인 ― …리눅스 SSH 패스워드 없이 자동 로그인 ― Jmnote리눅스 날짜 기준으로 파일 삭제하기 ― 백승현리눅스 날짜 기준으로 파일 삭제하기 ― Jmnote리눅스 디렉토리 용량 확인 du ― …리눅스 메모리 사용률 확인 ― 최재완리눅스 메모리 사용률 확인 ― Jmnote좀비 프로세스 찾기, 죽이기 ― 불량펭귄