Update virtual machine storage
PATCH
/vm/{rid}/storage/{storageId}
const url = 'https://sylve.lan:8181/api/vm/1/storage/1';const options = { method: 'PATCH', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"bootOrder":1,"emulation":"virtio-blk","enable":true,"filesystemTarget":"example","name":"example","readOnly":true,"size":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://sylve.lan:8181/api/vm/1/storage/1 \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "bootOrder": 1, "emulation": "virtio-blk", "enable": true, "filesystemTarget": "example", "name": "example", "readOnly": true, "size": 1 }'Partially update an attached storage device on a shut-off virtual machine
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”rid
required
integer
Virtual Machine RID
storageId
required
integer
Storage ID
Request Body
Section titled “Request Body”Storage changes
Media typeapplication/json
object
bootOrder
integer
emulation
string
enable
boolean
filesystemTarget
string
name
string
readOnly
boolean
size
integer
Responses
Section titled “Responses”Success
Media typeapplication/json
object
data
object
bootOrder
integer
dataset
object
guid
string
id
integer
name
string
pool
string
datasetId
integer
emulation
string
enable
boolean
filesystemTarget
string
id
integer
name
string
pool
string
readOnly
boolean
recordSize
integer
size
integer
type
string
uuid
string
vmId
integer
volBlockSize
integer
error
string
message
string
status
string
Example
{ "data": { "emulation": "virtio-blk", "type": "raw" }}Bad Request
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Unauthorized
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Forbidden
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Not Found
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Conflict
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Request Entity Too Large
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Internal Server Error
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Service Unavailable
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}