POST– Initiate CD media image redirection
Make sure RMedia configuration is enabled in BMC. If not, enable it through Web UI or refer to POST – Enable the Remote Media.
Make sure CD instance collection is more than 1, refer to GET – Virtual Media Collection. If there isn’t CD instance or only 1 CD instance, initiating CD media image redirection action will fail.
Request
POST https://{{ip}}/redfish/v1/Managers/{{manager_instance}}/VirtualMedia/{{CD_instance}}/Actions/VirtualMedia.InsertMedia
Content-Type: application/json
Request example
NFS
{
"Image": "//10.0.125.169/home/tamil/images/images/ubuntu-14.04.1-desktop-amd64.iso",
"TransferProtocolType": "NFS",
}
CIFS
{
"Image": "//<sys_ip>/home/test/images/javatools.iso",
"TransferProtocolType": "CIFS",
"UserName": "<sys_username>",
"Password": "<sys_password>"
}
Response
{
"@odata.context": "/redfish/v1/$metadata#Task.Task(Description,TaskState,Name,Id)",
"@odata.id": "/redfish/v1/TaskService/Tasks/1",
"@odata.type": "#Task.v1_4_2.Task",
"Description": "Task for InsertMedia Action",
"Id": "1",
"Name": "InsertMedia Action",
"TaskState": "New"
}
After a successful post call, using the TaskID check the TaskState in "/redfish/v1/TaskService/Tasks/<taskid>"and verify the value of "RedirectionStatus" OEM property in GET "/redfish/v1/Managers/Self/VirtualMedia/<cd_instance>".
Once Task created Auditlog will be generated for InsertMedia Post Action.
The Task is aborted due to an error, "TaskState"property value will be "Exception" and an appropriate error message will be displayed in the response of the Corresponding Task "/redfish/v1/TaskService/Tasks/<taskid>".