Mapping ESX server devices to Linux devices


While poking around on one of our ESX 3.0 beta servers, I came across the esxcfg-vmhbadevs command. This nifty utility allows you to view the Linux device associated with a given VMWare device:

$ /usr/sbin/esxcfg-vmhbadevs -m

vmhba2:0:0:1 /dev/sdc1 444cdb88-b3dc4745-bdb1-00093d11a79c
vmhba2:0:1:1 /dev/sdd1 444cdb9e-eea275ca-eab2-00093d11a79c
vmhba0:0:0:3 /dev/sda3 4476fbec-7f9e4f3e-7d67-00093d11a98e
vmhba2:0:2:1 /dev/sdg1 444cdbbb-be098ef5-45d7-00093d11a79c
vmhba2:0:3:1 /dev/sdh1 44770a21-57ed137c-d2d9-00093d11a98e
vmhba2:0:4:1 /dev/sdi1 44840de1-ab9e7e7d-dcd2-00093d11a98e
vmhba2:0:5:1 /dev/sdj1 447712b9-009decd6-3fc3-00093d11a98e
vmhba2:0:6:1 /dev/sdk1 44771536-e96c381f-561a-00093d11a98e
vmhba2:0:7:1 /dev/sdl1 44771553-cb331da9-6d36-00093d11a98e

$ /usr/sbin/esxcfg-vmhbadevs -q

vmhba0:0:0 /dev/sda
vmhba0:1:0 /dev/sdb
vmhba2:0:0 /dev/sdc
vmhba2:0:1 /dev/sdd
vmhba2:0:2 /dev/sdg
vmhba2:0:3 /dev/sdh
vmhba2:0:4 /dev/sdi
vmhba2:0:5 /dev/sdj
vmhba2:0:6 /dev/sdk
vmhba2:0:7 /dev/sdl
vmhba2:0:8 /dev/sdm
vmhba2:0:9 /dev/sdn
vmhba2:0:10 /dev/sde
vmhba2:0:11 /dev/sdf

In order to run esxcfg-vmhbadevs, you need to have access to the VMWare service console.

This article was posted by Matty on 2006-06-15 22:15:00 -0400 -0400