HP Virtual Connect Enterprise Manager 6.3.1 CLI Guide
Table Of Contents
- HP Insight Software Virtual Connect Enterprise Manager
- Contents
- 1 Getting Started
- 2 Using VCEMCLI
- 3 Using VCEM commands
- add profile
- set profile
- assign profile
- export profiles
- unassign profile
- add enet-connection
- set enet-connection
- remove enet-connection
- add fc-connection
- set fc-connection
- remove fc-connection
- add fcoe-connection
- set fcoe-connection
- remove fcoe-connection
- add iscsi-connection
- set iscsi-connection
- remove iscsi-connection
- set iscsi-boot-param
- remove iscsi-boot-param
- add server-port-map
- set server-port-map
- remove server-port-map
- poweroff devicebay
- poweron devicebay
- show power-status
- show job
- show version
- show vcem-status
- startvcdmaint
- cancelvcdmaint
- completevcdmaint
- 4 Error messages
- 5 Troubleshooting VCEMCLI
- VCEMCLI calls result in access denied errors
- VCEMCLI calls result in errors for invalid leading character or invalid characters
- VCEMCLI calls result in 404 errors
- API timeouts
- High CPU usage on the CMS server while running a VCEMCLI client
- Job reports failed status
- Completed with warning job status
- Unable to assign a profile to a Domain Group
- VC Domain reports Configuration Mismatch status
- VC Domain reports Expired License status
- Error on database operation occurs
- Failed to execute VCEM operation because VC firmware not supported
- Creating a server profile fails
- Server profile edit operation fails when target server is powered on
- Server profile job completed with success but changes have not occurred
- After a server profile assignment, some connections defined in the server profile are not functional
- Commands -add profile or -set profile error messages
- Command -add profile error messages
- Additional Troubleshooting Information and tools
- 6 Support and other resources
- Index

Table 1 Common options (continued)
DescriptionCLI options
When set, instructs VCEMCLI how long to wait for blocking
commands.
–timeout seconds
When set, instructs VCEMCLI how often to poll VCEM for
job or power status.
-pollinginterval seconds
Using VCEMCLI in a script
The following example illustrates how VCEMCLI can be used to automate common profile
management tasks. This example:
• Powers on the servers in the enclosure
• Creates server profiles
• Adds and edits network connections for the server profiles
• Assigns server profiles to the bays containing servers
@echo off
set CLI=vcemcli.exe
set VCDG=OA-78-VCDG
set NEWNET=NET2
set MAXPROFILES=5
set MAXBAYS=16
set ENCLNAME=OA-78
set VCEMCLI=-logfile c:\demo.log
echo Turn on all servers in enclosure %ENCLNAME% --------------------------------------------
for /L %%I in (1,1,%MAXBAYS%) DO (
%CLI% -show power-status -enclosureName %ENCLNAME% -bayname %%I
if ERRORLEVEL 240 (
echo There is no server in bay %%I
) else (
if ERRORLEVEL 1 (
echo Server in bay %%I is already on
) else (
echo Turning on server in bay %%I
%CLI% -poweron devicebay -enclosureName %ENCLNAME% -bayname %%I
if ERRORLEVEL 1 goto ERRORHANDLER
)
)
)
echo Creating %MAXPROFILES% profiles -------------------------------------------------------
for /L %%I in (1,1,%MAXPROFILES%) DO (
echo Creating profile %%I of %MAXPROFILES%
%CLI% -add profile -vcdomaingroup %VCDG% -profilename PROFILE-%%I
if ERRORLEVEL 1 goto ERRORHANDLER
)
echo Profile creation complete - adding network connections --------------------------------
for /L %%I in (1,1,%MAXPROFILES%) DO (
echo Adding enet connection to PROFILE-%%I
%CLI% -add enet-connection -profilename PROFILE-%%I
if ERRORLEVEL 1 goto ERRORHANDLER
)
echo Add network connection complete - Update network connections --------------------------
for /L %%I in (1,1,%MAXPROFILES%) DO (
echo Assigning enet connection %NEWNET% to port 3 of PROFILE-%%I
%CLI% -set enet-connection -profilename PROFILE-%%I -network %NEWNET% -portnumber 3
if ERRORLEVEL 1 goto ERRORHANDLER
)
echo Assign the profiles to bays that have servers present ---------------------------------
for /L %%I in (1,1,%MAXPROFILES%) DO (
::Turn off the server in the target bay ONLY if a server is present
%CLI% -show power-status -enclosureName %ENCLNAME% -bayname %%I
if ERRORLEVEL 240 (
echo There is no server in bay %%I - skipping profile assignment
) else (
if ERRORLEVEL 1 (
echo ------------------------------------------
echo Turning off server in bay %%I
%CLI% -poweroff devicebay -enclosureName %ENCLNAME% -bayname %%I -forceOnTimeout
8 Using VCEMCLI