BladeSystem - General
Showing results for 
Search instead for 
Did you mean: 

Re: HPrest: command example required

Occasional Contributor

HPrest: command example required



i am using HPrest to attach virtual media, i am able to attache the virtual media using below sequence of hprest commands.

1. hprest --config=/root/hprest.conf --nologo login -u  admin

2. hprest --nologo select VirtualMedia
3. hprest --nologo set Image=https: --filter links/self/href=/rest/v1/Managers/1/VirtualMedia/2 --commit


i want sequrence of commands to remove virtual media. Below set commands are not working.

1. hprest --config=/root/hprest.conf --nologo login -u HPadmin
2. hprest --nologo select VirtualMedia
3. hprest --nologo set Image=''  --filter links/self/href=/rest/v1/Managers/1/VirtualMedia/2 --commit
Committing changes...
No more Virtual Media connections are available, because the maximum number of connections are already established.
ERROR : Failed to commit with iLO error code 400


result is same even if i use 'set Image='""' double quote.


i am using 'hprest-1.4-49' version of hprest.  HP hardware is BL460c Gen9 with iLO 4 firmware version '2.30 Aug 19 2015' with adavanced license.

Thanks and regards,




Honored Contributor

Re: HPrest: command example required

It seems the set Image="" doesn't work with this tool so, try creating a file and copy the below JSON into it.

	"path": "/rest/v1/Managers/1/VirtualMedia/2/",
	"body": {
		"Image": null

Then, send the JSON file to iLO4 using the following command:

hprest --nologo rawpatch {your_filename_here}

If you feel this was helpful please click the KUDOS! thumb below!