ESXi 노드 점검 명령어
ESXi 노드를 SSH에서 점검하는 명령어 모음입니다. 버전, 유지보수 모드, esxtop, 스토리지 경로, 네트워크, VM 상태, 로그 확인 순서로 정리했습니다.
ESXi 노드 점검은 vCenter 화면만 보는 것보다 SSH에서 esxcli, vim-cmd, esxtop, 로그를 같이 보는 편이 정확합니다. 장애 대응이나 정기 점검 때 바로 확인할 수 있도록 버전, 유지보수 모드, CPU/메모리, 스토리지, 네트워크, VM, 로그 순서로 정리합니다.
기본 정보와 유지보수 상태
vmware -vl
hostname
uptime
esxcli system version get
esxcli system maintenanceMode get
esxcli system boot device get노드 작업 전에는 유지보수 모드 여부를 먼저 확인합니다. 운영 중인 VM이 있는 노드에서 스토리지나 네트워크 작업을 바로 진행하면 장애 범위가 커질 수 있습니다.
하드웨어와 센서 상태
esxcli hardware platform get
esxcli hardware cpu list
esxcli hardware memory get
esxcli hardware ipmi sdr list 2>/dev/nullIPMI sensor 명령은 서버 모델이나 드라이버 상태에 따라 동작하지 않을 수 있습니다. 하드웨어 경고가 보이면 vCenter Hardware Status, iDRAC/iLO/IPMI, 서버 벤더 로그를 같이 확인합니다.
CPU와 메모리 확인
esxtopesxtop에서 자주 쓰는 키는 다음과 같습니다.
| 키 | 화면 | 확인 포인트 |
|---|---|---|
c |
CPU | %USED, %RDY, %CSTP |
m |
Memory | Ballooning, swapping, consumed memory |
d |
Disk adapter | latency, commands, queue |
u |
Disk device | device latency, kernel latency |
n |
Network | packet drop, bandwidth |
VM CPU ready가 높으면 물리 CPU가 부족하거나 vCPU 할당이 과한 상태일 수 있습니다. 메모리 ballooning이나 swapping이 발생하면 호스트 메모리 압박을 의심합니다.
스토리지와 경로 확인
esxcli storage core adapter list
esxcli storage core device list
esxcli storage core path list
esxcli storage filesystem list
esxcli storage vmfs extent list스토리지 장애에서는 device가 보이는지, path가 dead/off 상태인지, datastore mount가 정상인지 순서대로 확인합니다.
esxcli storage core path list | egrep -i 'naa\\.|state|adapter|target|lun'
esxcli storage nmp device list
tail -n 200 /var/log/vmkernel.log | egrep -i 'naa\\.|apd|pdl|scsi|timeout|reset|lost access|permanent device loss'APD(All Paths Down)나 PDL(Permanent Device Loss) 메시지가 있으면 ESXi 단독 문제가 아니라 SAN, HBA, 스위치 zoning, storage controller 상태까지 같이 봐야 합니다.
네트워크 확인
esxcli network nic list
esxcli network nic get -n vmnic0
esxcli network vswitch standard list
esxcli network vswitch dvs vmware list
esxcli network ip interface list
esxcli network ip interface ipv4 get
esxcli network ip route ipv4 list링크가 up인지, 속도/duplex가 예상과 맞는지, management vmkernel 인터페이스 IP와 gateway가 올바른지 확인합니다.
vmkping <gateway-ip>
vmkping -I vmk0 <management-gateway-ip>
vmkping -I vmk1 <storage-network-ip>가상머신 상태 확인
vim-cmd vmsvc/getallvms
esxcli vm process list특정 VM의 전원 상태나 task 상태를 확인합니다.
VMID="<vmid>"
vim-cmd vmsvc/power.getstate "$VMID"
vim-cmd vmsvc/get.summary "$VMID"강제 power off는 마지막 수단입니다. 먼저 vCenter task, guest OS 상태, snapshot/backup 작업 여부를 확인합니다.
로그 확인
tail -n 200 /var/log/vmkernel.log
tail -n 200 /var/log/hostd.log
tail -n 200 /var/log/vpxa.log
tail -n 200 /var/log/vobd.log| 로그 | 주요 용도 |
|---|---|
vmkernel.log |
스토리지, 네트워크 드라이버, 커널, HBA, APD/PDL |
hostd.log |
ESXi host management service, VM task |
vpxa.log |
vCenter agent 통신 |
vobd.log |
ESXi event/alarm성 로그 |
관리 에이전트 재시작 전 확인
vCenter에서 호스트가 disconnected처럼 보일 때 management agent 재시작을 고려할 수 있습니다. 하지만 VM 자체가 꺼지는 작업은 아니어도 task 표시나 vCenter 연결에 영향이 있으므로 먼저 로그를 확보합니다.
/etc/init.d/hostd status
/etc/init.d/vpxa status
# 필요 시에만
/etc/init.d/hostd restart
/etc/init.d/vpxa restart빠른 점검 순서
vmware -vl,maintenanceMode get으로 노드 기본 상태를 확인합니다.esxtop으로 CPU ready, memory balloon/swap, disk latency를 봅니다.esxcli storage로 datastore, device, path 상태를 확인합니다.esxcli network와vmkping으로 NIC, vmkernel, route를 확인합니다.vim-cmd와esxcli vm process list로 VM 상태를 확인합니다.vmkernel.log,hostd.log,vpxa.log를 확보한 뒤 조치합니다.