Skip to main content

PATCH – Insert/Eject a virtual media

Use the PATCH method to insert or eject a virtual media.

Note
In current implementation:
  • Not support to insert/eject “Remote{N}” media.

  • Not support to insert “RDOC{N}” media.

  • Only support to insert “EXT{N}” media via protocol HTTP or no credential required NFS.

Request URL

PATCH https://<BMC_IPADDR>/redfish/v1/Managers/1/VirtualMedia/{id}

Request body

Properties to be updated are shown as bellow, all of these properties can be changed individually.

FieldTypeError Message ID

Image

String

A URI providing the location of the selected image. Set to null to eject the virtual media.

Inserted

Boolean

Indicate if virtual media is inserted in the virtual device. set to false to eject the virtual media.

WriteProtected

Boolean

Indicate the media is write protected.

UserName

String

User name

Password

String

Null

Response

The response returns same content as GET operation with updated properties.

Status code

HTTP Status CodeError Message ID
400InsufficientPrivilege, Conflict, PropertyValueTypeError, PropertyMissing, PropertyNotWritable, SourceDoesNotSupportProtocol
500InternalError

Example

The following example is PATCH body.

{
"Image": "http://192.168.1.2/Core-current.iso",
"Inserted": true,
"WriteProtected": true,
"UserName":"test",
"Password":"PASSW0RD"
}

After the PATCH operation runs successfully, querying the chassis resource returns below example

{
"ConnectedVia": "URI",
"Id": "EXT1",
"MediaTypes": [
"CD",
"DVD"
],
"Image": "http://192.168.1.2/Core-current.iso",
"@odata.context": "/redfish/v1/$metadata#VirtualMedia.VirtualMedia",
"@odata.id": "/redfish/v1/Managers/1/VirtualMedia/EXT1",
"ImageName": "Core-current.iso",
"@odata.type": "#VirtualMedia.v1_3_0.VirtualMedia",
"WriteProtected": true,
"@odata.etag": "\"5fb9f3ba323469f34cf349a889ff49cf\"",
"Inserted": true,
"Name": "VirtualMedia",
"Password": null,
"Description": "This resource shall be used to represent a virtual media service for a Redfish implementation."
"Inserted": false,
"UserName": "test",
"TransferMethod": “Stream”,
"TransferProtocolType": “HTTP”

}