BladeSystem - General
1752806 Members
5936 Online
108789 Solutions
New Discussion

HPrest: command example required

 
Adishesh
Occasional Contributor

HPrest: command example required

Hi,

 

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 https://10.43.21.2 -u  admin

2. hprest --nologo select VirtualMedia
3. hprest --nologo set Image=https:192.169.2.2/boot.iso --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 https://10.43.21.65 -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,

Adishesh

 

 

1 REPLY 1
Oscar A. Perez
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!