Please note: I noticed that this post still gets a lot of attention... Before reading through the whole post you should know: the workaround described here is only necessary for ESXi 4.x. For ESXi 5.x there is an officially supported Online ACU CLI available from HP (see the update at the end of this post)!A while ago I posted about the Offline version of HP's Array Configuration Utility (ACU). HP does not provide an Online version of this tool for VMware ESXi, so expanding a local RAID array can only be done with this Offline version which requires a downtime of the host for the whole duration of the expansion.
Somehow I did not want to accept this, and - by just trying it out - I finally discovered that you can actually run the Linux version of the ACU CLI tool (hpacucli) in ESXi! hpacucli is not the web interface version of the ACU (which is called cpqacuxe) that you may be used to from Windows systems. cpqacuxe is also available in a Linux version, but I could not get it to run in the ESXi shell.
hpacucli is surely less intuitive to use, but it offers the same functionality than the web tool and allows you to do all controller configuration and volume expansion tasks that are supported with SmartArray controllers. Before trying it be sure to look at the Configuring Arrays on HP Smart Array Controllers Reference Guide (section "Using the ACU CLI", p51 f.) to learn how to use it. The reference guide also describes another utility named hpacuscripting that is also included in this package and works with ESXi. I haven't tried that, but it looks like it is mainly meant for the initial RAID configuration on a newly deployed host.
The Linux version of hpacucli requires some script modifications to make it run in the ESXi shell. First I thought about providing a modified version of it that you could just install and run in ESXi, but then I noticed that HP's license terms do not allow to redistribute the software package. So I will provide step-by-step instructions instead for how to do the required modifications on your own using a Windows machine. Don't worry, it's easy:
1. Download the file hpacucli-8.75-12.0.noarch.rpm from HP.
2. Download 7-zip and install it.
3. Open the downloaded rpm-file in 7-zip:
4. Inside the 7-zip window navigate to the embedded directory \opt\compaq\hpacucli\bld by double-clicking on the displayed file and directory names:
5. Select all the displayed files and click on the "Extract" or "Copy" button to extract them to a new empty sub-directory (U:\$Download\hpacucli in this example):
6. Download the patch script fix4esxi.sh that I prepared and put it into the same directory.
7. Now use the vSphere Client to upload the complete directory to a datastore that is accessible by the host that you want to run the tool on. You can store the directory on a shared datastore to make the same copy accessible to multiple hosts:
8. Now open a shell as root in the ESXi host that you want to run the tool on. Change to the datastore directory that you uploaded and run the patch script like this:
. ./fix4esxi.sh
You need to run the script only once! It will patch the shell scripts that are included and restore the executable permission bits that got lost when we extracted the files in Windows.
9. Now you are ready to run the hpacucli utility in ESXi, either by running ./hpacucli after changing to the installation directory or by calling it by its full file path:
The command controller all show config will immediately show you if the utility has detected your SmartArray controller and display its configuration. With the help command you will get an overview of all available commands and how to use them. However, I strongly recommend reading the above mentioned reference guide, because it includes more detailed information and usage examples.
Now at the end ... a big fat warning and some more hints: Running hpacucli inside ESXi is (of course) not supported by HP or VMware! I can tell you that it just works for me in the configurations that I was able to test, but it could as well fail completely for you or blow up your host!
The tool was able to detect SmartArray P400 and P410i controllers with ESXi 4.1 and 5.0. On an ESXi 5.0 host with a P400 controller I was able to break a RAID1 mirror and concatenate the disks to a RAID0 volume of double size. However, ESXi would not pick up the changed disk size, so I was not able to grow the VMFS volume without rebooting the host. At least I only needed to reboot (causing a very short downtime) and did not have to take the host offline for the whole volume conversion process (which can take very long depending on hard disk sizes).
I wonder if ESXi not detecting the disk size change is due to the old cciss driver that the P400 controller is using. Other SmartArray controllers use the newer hpsa driver that might not show this issue.
Please provide feedback by commenting on this post if you manage to successfully make use of hpacucli in ESXi like described here! This will help to get me and others an overview of what works and what not.
Update (2012-04-18): In the meantime HP has officially made available hpacucli for ESXi. It is part of the HP ESXi Utilities Offline Bundle for VMware ESXi 5.0 that I reference on my HP & VMware Links page. For earlier versions of ESXi you still depend on the workaround that I described here.
Tried it out - really works! Thanks!
ReplyDeleteThank you very much!
ReplyDeleteIt was really useful, as this weekend I planned to take ESxi host offline and use offline ACU CD just to change Acceleration ratio... now I was able to do that online :)
Worked 1st time.
ReplyDeleteThe ACU say my ctrl and crashed.
I tried getting ver. 9.0 and upload that instead.
I now can't run fix4esxi.sh or hpacucli. :(
Access denied.
Any ideas
Ahhhh, missed the 1st . in . ./fix4esxi.sh
Deleteall good
almost. :(
DeleteWhen I show config I get:
Smart Array P410i in Slot 0 (Embedded) S(sn:xxxxxxx)
array A (SAS, Illigal instruction
Crash. :(
Are you using ESXi 5.0? In the meantime HP officially made available hpacucli for ESXi 5.0. It's part of the "HP ESXi Utilities Offline Bundle" that I have referenced on my "HP & VMware Links" page at http://v-front.blogspot.de/p/hp-vmware-links.html
DeletePlease give it a try, it should work better.
Hi Andreas
DeleteNo, It is an 4.0.0, 261974
Kinda old. :)
But perhaps an update would do the trick?
I'll try that first, and post the result.
Just ran the procedure on ESXi 5.5 with an HP P410 controller (Gigabyte mainboard) and is working there too ;-)
Delete(Had to use this option as the default HP utilities seem only to be willing to intall on a genuine HP mainboard :@)
But all well in the end ! Thanks for sharing your "guts and glory" :-)
grtz
Steve
Hi Anonymous,
Deleteif you are using a non-HP server then look at this post to find out how to install the HP packages on it.
Andreas
HP ESXi Utilities Offline Bundle is not available for ML 150 G6, but your trick works perfectly.
ReplyDeleteThanks, you made my day!
I have the HP ESXi 5.0.
ReplyDeleteany idea on this?
/opt/hp/hpacucli/bin # ./hpacucli
HP Array Configuration Utility CLI 9.10.22.0
Detecting Controllers...Unable to open lpfcdfc
Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.
lpfcdfc is a driver for Emulex adapters. The hpacucli tool works for HP SmartArray controllers only. Do you also have a SmartArray controller in the box? Then you can ignore this warning and should be able to use the tool with it.
DeleteHi ,
ReplyDeleteIt seems I have some problem here.
I run this patched utility on DL360 G7 ESXi Build 260247 and everything is working:
~ # vmware -v
VMware ESXi 4.1.0 build-260247
~ # cd /vmfs/volumes/LUN2-FC/hpacucli/
/vmfs/volumes/4f52a754-e996dbe8-8aec-984be1676114/hpacucli # ./hpacucli
HP Array Configuration Utility CLI 8.75-12.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.
=> ctrl all show status
Smart Array P410i in Slot 0 (Embedded)
Controller Status: OK
Cache Status: OK
Battery/Capacitor Status: OK
=>
When i run it on my PROD servers which is DL360 G6 ESXi build-348481. It cannot detect controller
/vmfs/volumes/4afda17c-a5c30bf5-a372-f4ce46b1de55/hpacucli # ./hpacucli
HP Array Configuration Utility CLI 8.75-12.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.
=> ctrl all show status
Error: No controllers detected.
=> exit
/vmfs/volumes/4afda17c-a5c30bf5-a372-f4ce46b1de55/hpacucli # vmware -v
VMware ESXi 4.1.0 build-348481
Any idea why cannot detect controller. I tried same method with newest version 9.20.9.0 but i get that ACU is already running.
HP Array Configuration Utility CLI 9.20.9.0
Detecting Controllers...
Error: Another instance of ACU is already running (possibly a service). Please
terminate the ACU application before running the ACU CLI. Press ENTER to
exit.
Also tried extracting from hpacucli-9.0-24.0.noarch but without success (again no controller detected)
I tried on machine models:
DL360 G6 VMware ESXi 4.1.0 build-348481
DL360 G7 VMware ESXi 4.1.0 build-348481
But controller is not detected. Maybe ESXi BUILD version is mandatory.
ANY IDEAS ?
Hi Valentin,
Deleteplease compare the versions of the hpsa driver (that is used for the P410i controller) between a working and a non-working system. Use the command
vmkload_mod -s hpsa
to display the driver's version number. If there is any difference then you probably need to update (or downgrade?) the driver to make the hpacucli tool work with it. This will of course also require a reboot of the hosts ...
The error message "Another instance of ACU is already running" is usually caused by left-over lock files that the hpacucli shell script creates to prevent concurrent usage of multiple instances. Look inside the script to find out where these lock files are created and remove them before calling it again.
Good luck!
- Andreas
Hi,
ReplyDeleteHas anyone been successfull to get the HP ACU GUI working on the ESXi 5.1?
Thanks,
Suhail.
Hi,
ReplyDeleteThanks a lot for the usefull script. Still using this for our smaller customers that have ESX4 / 4.1i and no shared storage.
Thanks,
Erik
Great, quick and easy, thanks ;)
ReplyDeleteI gonna run fix4esxi.sh but I receive "permission denied". would you please give me your comment?!
ReplyDeleteYou missed the first . in ". ./fix4esxi.sh"
DeleteIs there a command to force o rebuild a raid in this CLI??
ReplyDeleteIt is weird on my system. I have the command output here: ( I copied all the files in HP folder and uploaded to the ESX4 host )
ReplyDelete[root@webesx02 HP]# vmware -v
VMware ESX 4.0.0 build-208167
[root@webesx02 HP]# ls -al
total 21952
drwxr-xr-x 1 root root 1540 Mar 21 11:18 .
drwxr-xr-t 1 root root 1680 Mar 21 11:18 ..
-rw------- 1 root root 1178 Mar 21 11:18 fix4esxi.sh
-rw------- 1 root root 556 Mar 21 11:18 hpacucli
-rw------- 1 root root 8816780 Mar 21 11:18 .hpacucli
-rw------- 1 root root 7668 Mar 21 11:18 hpacucli-8.75-12.0.noarch.txt
-rw------- 1 root root 20943 Mar 21 11:18 hpacucli.license
-rw------- 1 root root 586 Mar 21 11:18 hpacuscripting
-rw------- 1 root root 7354812 Mar 21 11:18 .hpacuscripting
-rw------- 1 root root 2207997 Mar 21 11:18 libcpqimgr.so
-rw------- 1 root root 899 Mar 21 11:18 mklocks.sh
[root@webesx02 HP]# . ./fix4esxi.sh
This is a script to patch the Linux version of hpacucli to work in VMware ESXi
You need to run this only ONCE after the files have been copied to the datastore
See http://www.v-front.de/2012/03/how-to-run-hp-online-acu-cli-for-linux.html
dirname: invalid option -- b
Try `dirname --help' for more information.
Patching hpacucli and hpacuscripting scripts ...
sed: can't read /hpacucli: No such file or directory
sed: can't read /hpacuscripting: No such file or directory
sed: can't read /hpacucli: No such file or directory
sed: can't read /hpacuscripting: No such file or directory
Fixing permissions of executables ...
chmod: cannot access `/hpacucli': No such file or directory
chmod: cannot access `/hpacuscripting': No such file or directory
chmod: cannot access `/.hpacucli': No such file or directory
chmod: cannot access `/.hpacuscripting': No such file or directory
chmod: cannot access `/mklocks.sh': No such file or directory
All done.
--There are errors here so I tried:
[root@webesx02 HP]# ./fix4esxi.sh
This is a script to patch the Linux version of hpacucli to work in VMware ESXi
You need to run this only ONCE after the files have been copied to the datastore
See http://www.v-front.de/2012/03/how-to-run-hp-online-acu-cli-for-linux.html
Patching hpacucli and hpacuscripting scripts ...
Fixing permissions of executables ...
All done.
[root@webesx02 HP]# ./hpacucli
./hpacucli: line 14: /vmfs/volumes/raid1/HP/.hpacucli: cannot execute binary file
What should I do here? Thanks a lot.
Hi,
Deletemy instructions are for ESXi, but you are using classic ESX.
Please refer to http://www.bradcoe.com/wordpress/?p=120 to get this working on ESX 4.0.
- Andreas
Hi
ReplyDeleteI have this error
/vmfs/volumes/50c0a24c-0d239026-6230-0013210c848a/hpacucli # ./hpacucli
./hpacucli: line 9: /vmfs/volumes/datastore1: not found
./hpacucli: line 14: /vmfs/volumes/datastore1: not found
/vmfs/volumes/50c0a24c-0d239026-6230-0013210c848a/hpacucli #
How I can change the path ??
Thx !
Hi Gonzalo,
Deletehave you moved the files to another directory after running fix4esxi.sh?
You can change the path by editing the file hpacucli (change line #7) with vi in an ESXi shell.
Andreas
Unfortunately, I'm having no luck with this process at all. Any insight would be wonderful. Thank you
ReplyDeleteThinking it could be a Smart Array firmware / HPACUCLI conflict issue of some sort as this machine is patched to the latest HP firmware levels and ESXi 4.0 has no HP CIM providers / no VMWare updates of any kind.
BTW: Ive also tried this process with this System fully patched and with the latest HP CIM - same results.
Full discoslure - i am NOT any kind of a Linux guru..
-------------------------------------------------------------------------
Clean ESXi 4.0 installation with Power off/on - DL380 G5
Smart Array P400 7.24
Using hpacucli 8.75 - While i am able to get into the cli, enumerating any array configuration results in the error message below + a CLI crash and an ssh session hang.
=>controller all show config
Smart Array P410i in Slot 1 (Embedded) S(sn:xxxxxxx)
array A (SAS, Illigal instruction
ssh session hangs subsequent to this
-------------------------------------------------------------------------
Clean ESXi 4.0 installation with Power off/on - DL380 G5
Smart Array P400 7.24
Using hpacucli 9.40 - Pulled HPACUCLI from: ftp://ftp.hp.com/pub/softlib2/software1/pubsw-linux/p414707558/v80071/
/vmfs/volumes/52435221-17464000-63f3-001cc4697054/hpacucli # ./hpacucli
HP Array Configuration Utility CLI 9.40.12.0
Detecting Controllers...
Error: Another instance of ACU is already running (possibly a service). Please
terminate the ACU application before running the ACU CLI. Press ENTER to
exit.
Again - this is a clean install - the HPACUCLI had never been run before.
-------------------------------------------------------------------------
System FYIs..
- Original 4.0 build ISO
/vmfs/volumes/52435221-17464000-63f3-001cc4697054/hpacucli # vmware --v
VMware ESXi 4.0.0 build-171294
/vmfs/volumes/52435221-17464000-63f3-001cc4697054/hpacucli # vmkload_mod -s hpsavmkload_mod module information
input file: /usr/lib/vmware/vmkmod/hpsa.o
Version: Version 3.6.14.24vmw, Build: 171294, Interface: 9.0, Built on: Jun 11 2009
Please don't waste your time with troubleshooting ESXi 4.0! I tested this only with ESXi 4.1, but you should really upgrade to ESXi 5.x which does no longer require the workaround, I would recommend using ESXi 5.1 for now, because 5.5 still has poor support from HP.
DeleteIt worked perfectly on ProLiant DL380 G7 (P410i controller) with ESXi 4.1
ReplyDeleteThank you for this information.
FYI, the hpacucli script did not properly handle datastore paths with spaces in them. I got path errors in line 9 and 13. The workaround was simple of course I just cd'd into the volume by its UID path instead of using the symlink as this changed the results of 'pwd' to showing a path without spaces and it worked. So if anyone is getting that error it could be because they cd'd into the symlinked volume name and it contains spaces. I think this could be easily fixed by adding some quotes around the path variable in hpacucli but its working for me this way so I'm happy. Expanding an array as I speak. Thanks!
ReplyDeleteThis worked great on HP DL360 G7 running ESXi 4.1!! Thanks!
ReplyDeleteThis worked great on HP DL380 G7 running ESXi 4.1!! Thanks!
ReplyDeleteI'm glad that you found this useful, but now it's really time to upgrade ESXi, right?!
DeleteHehe, yeah. we have some vcenter 2.x
DeleteAwesome stuff, picked up a new client still running 4.1 and this saved me! Thanks!
ReplyDeleteSt google led me to this post and I couldn't be more grateful to you for taking the time to write it. It worked smoothly for me and allowed me to get out of a very compromised situation. Many thanks!
ReplyDeleteI managed to install it on HP ML110 G6 server with Smart Array P212 Controller and now it detects that one of my drive is failed in my second array. Thanks!!
ReplyDeleteJust FYI if this helps anyone, on ESXi 6.0 I was able to install hpssacli which seems to replace hpacucli.
ReplyDeleteI did this by running:
esxcli software vib install -d "http://vibsdepot.hpe.com/hpq/latest/"
After a reboot, you can use the utility like so:
/opt/hp/hpssacli/bin/hpssacli ctrl all show status
Hi, does anybody still has the fix4esxi.sh script available? the googlecode page is not available anymore. Need to keep one of the old machines alive for some more time...
ReplyDeleteHi J
DeleteI rehosted the script here https://vibsdepot.v-front.de/tools/fix4esxi.sh.
But remember, no one should really still use ESXi 4.1 these days ...
Andreas
Thank you all very much for sharing.. folks like me that built things a long time back and haven't had time to go back to upgrade really appreciate your help! Really, thank you!
Delete