So there is a bug in the VIMA 1.0. When you run esxcfg-mpath -a on a host with a service console, it out puts the WWPNs on the FC cards (good). When you run it on the VIMA against a host, you get the WWNN (bad).
Here is a diff to fix it:
sub list_hbas {
my ($ss, $lunName) = @_;
my $hbas = $ss->storageDeviceInfo->hostBusAdapter;
foreach my $hba (@$hbas) {
if (defined($hba)) {
next if $hba->isa("HostBlockHba");
next if $hba->isa("HostParallelScsiHba");
my $pciString = get_pci_string($hba);
printf("%s %s%s\n",
$hba->device,
-$hba->isa("HostFibreChannelHba") ? $hba->nodeWorldWideName . " " : "",
+$hba->isa("HostFibreChannelHba") ? $hba->portWorldWideName . " " : "",
$pciString);
}
}
}
Is this the right place for asuch a bug report?
--Matt
VCP, vExpert, Unix Geek
It also outputs as a long, not a hex as in the one form a service console. long isn't very useful.....
--Matt
VCP, vExpert, Unix Geek
Hey Matt,
I think this is a good place for the bug, but if Harvey (PM for vMA/VIMA) does not get back you could also file an SR with Vmware)
Not sure if this was caught before or internally, but in the next release of vMA, the --a option is not longer available with esxcfg-mpath and you'll see some different format output which makes things easier to read. I know some other bugs there were found may not get fixed in 1.0 release and its been recommended that when vMA 4.0 is out, to just upgrade.
Here's a sample out from vMA with esxcfg-mpath -l:
[vi-admin@rafaeli ~]$ esxcfg-mpath --server everest.primp-industries.com -l block.cciss/c0d0:0-block.0:0-mpx.vmhba0:C0:T0:L0 Runtime Name: vmhba0:C0:T0:L0 Device: mpx.vmhba0:C0:T0:L0 Device Display Name: Local VMware Disk (mpx.vmhba0:C0:T0:L0) Adapter: vmhba0 Channel: 0 Target: 0 LUN: 0 Adapter Identifier: block.cciss/c0d0:0 Target Identifier: block.0:0 Plugin: NMP State: active Transport: block fc.20000000c97baa38:10000000c97baa38-fc.50014380013c90e0:50014380013c90ed-naa.50014380013c90e0 Runtime Name: vmhba1:C0:T1:L0 Device: naa.50014380013c90e0 Device Display Name: HP Fibre Channel RAID Ctlr (naa.50014380013c90e0) Adapter: vmhba1 Channel: 0 Target: 1 LUN: 0 Adapter Identifier: fc.20000000c97baa38:10000000c97baa38 Target Identifier: fc.50014380013c90e0:50014380013c90ed Plugin: NMP State: active Transport: fc Adapter Transport Details: WWPN: 10:00:00:00:c9:7b:aa:38 WWNN: 20:00:00:00:c9:7b:aa:38 Target Transport Details: WWPN: 50:01:43:80:01:3c:90:ed WWNN: 50:01:43:80:01:3c:90:e0
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
If you find this information useful, please award points for "correct" or "helpful".
Yeah, but if I don’t have any luns yet..., -l doesn't do much for me.
--M
True, looks like -a option has moved to what used to be the esxcfg-vmhbadevs command from what I can tell:
[root@everest ~]# esxcfg-scsidevs esxcfg-scsidevs <options> Print the mappings between vmhba names and /dev names -l|--list List all Logical Devices known on this system with device information. -c|--compact-list List all Logical Devices each on a single line, with limited information. -u|--uids List all Device Unique Identifiers with their primary name. -d|--device Used to filter the --list, --compact-list and uids commands to limit output to a specific device. -m|--vmfs Print mappings for VMFS volumes to their Service Console partitions and vmhba names. -f|--vfat Print mappings for VFAT volumes to their Service Console partitions and vmhba names. -a|--hbas Print HBA devices with identifying information -A|--hba-device-list Print a mapping between HBAs and the devices it provides paths to. -o|--offline-cos-dev Offline the COS device corresponding to this vmkernel device. -n|--online-cos-dev Bring online the COS device corresponding to this vmkernel device. -h|--help Show this message.
[root@everest ~]# esxcfg-scsidevs -a vmhba0 cciss link-n/a block.cciss/c0d0:0 (11:8.0) Hewlett-Packard Company Smart Array E200i vmhba1 lpfc820 link-up fc.20000000c97baa38:10000000c97baa38 (16:0.0) Emulex Corporation LPe11000 4G b Fibre Channel Host Adapter vmhba2 lpfc820 link-up fc.20000000c97baa39:10000000c97baa39 (16:0.1) Emulex Corporation LPe11000 4G b Fibre Channel Host Adapter
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
If you find this information useful, please award points for "correct" or "helpful".
FYI - this issue looks like it was fixed in the upcoming vMA release.
There will be a backwards compatible esxcfg-mpath for ESX 3.5 called esxcfg-mpath35 and the code has been updated:
sub list_hbas { my ($ss, $lunName) = @_; my $hbas = $ss->storageDeviceInfo->hostBusAdapter; foreach my $hba (@$hbas) { if (defined($hba)) { next if $hba->isa("HostBlockHba"); next if $hba->isa("HostParallelScsiHba"); my $pciString = get_pci_string($hba); printf("%s %s%s\n", $hba->device, $hba->isa("HostFibreChannelHba") ? dec_to_hex($hba->portWorldWideName) . " " : "", $pciString); } } }
I believe there will not be any fixes/updates going to VIMA 1.0 and VMware will just recommend everyone to upgrade to vMA 4.0 when it's out
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
If you find this information useful, please award points for "correct" or "helpful".
lamw wrote:
Not sure if this was caught before or internally, but in the next release of vMA, the --a option is not longer available with esxcfg-mpath and you'll see some different format output which makes things easier to read. I know some other bugs there were found may not get fixed in 1.0 release and its been recommended that when vMA 4.0 is out, to just upgrade.
That sounds right.
Please try it with vSphere CLI 4.0 which will be included in vMA 4.0 (available later this month). If you encounter problems with that version please post them here. Thanks.
--Harvey
Harvey Alcabes
Product Manager
VMware, Inc.