Edit Virtual Server Disks

To edit a VMware Cloud Director virtual server disk, use the following request: 

PUT /settings/disks/:id.xml
PUT /settings/disks/:id.json

You also can edit a virtual server disk, using the following URL: /virtual_machines/:virtual_machines_id/disks/:id

XML Request Example

curl -i -X PUT http://onapp.test/settings/disks/12.xml -d '<disk><label>BU</label><disk_size>1</disk_size><data_store_id>33</data_store_id><hot_migrate_disk>1</hot_migrate_disk></disk>' -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml' 

JSON Request Example

curl -i -X PUT http://onapp.test/settings/disks/12.json -d '{"disk":{"label":"BU", "disk_size":"1", "data_store_id":"33", "hot_migrate_disk":"1"}}' -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json'

Where: 

label - the label of the disk

disk_size - the disk space in GB

data_store_id - the ID of a data store you want to migrate the disk to

hot_migrate_disk - set to 1 to migrate the disk in the hot (live) mode, otherwise, set to

  • You cannot decrease the size of the disk.
  • If fast provisioning is enabled for the disk resource pool, the disk cannot be resized.
  • If you resize the disk of a VS that is powered on, the virtual server will be rebooted. 
  • If you migrate the disk without the hot_migrate_disk option enabled, the virtual server will be rebooted.
  • You can only migrate disks to data stores in data store zones assigned to your bucket
  • You cannot migrate a disk to a data store with less capacity than the disk size.