ServerMania logo

Get List of VS Disks

To get the list of disks available for a particular VS, use the following request:

GET /virtual_machines/:virtual_machine_id/disks.xml
GET /virtual_machines/:virtual_machine_id/disks.json

XML Request Example

curl -i -X GET -u user:userpass --url http://test/virtual_machines/458/disks.xml

JSON Request Example

curl -i -X GET -u user:userpass --url http://test/virtual_machines/458/disks.json

XML Output Example

<disks type="array">
<built type="boolean">true</built>
<burst_bw type="integer">1000</burst_bw>
<bus nil="true"/>
<created_at type="datetime">2013-01-21T12:59:06+02:00</created_at>
<data_store_id type="integer">6</data_store_id>
<disk_size type="integer">60</disk_size>
<disk_vm_number type="integer">0</disk_vm_number>
<file_system type="symbol">ext3</file_system>
<id type="integer">868</id>
<iqn nil="true"/>
<is_swap type="boolean">false</is_swap>
<label nil="true"/>
<locked type="boolean">false</locked>
<max_bw type="integer">1000</max_bw>
<mount_point nil="true"/>
<primary type="boolean">true</primary>
<updated_at type="datetime">2013-01-21T13:00:18+02:00</updated_at>
<virtual_machine_id type="integer">458</virtual_machine_id>
<volume_id nil="true"/>
<has_autobackups type="boolean">false</has_autobackups>


add_to_freebsd_fstab - true, if this disk is added to the FreeBSD fstab, otherwise false

add_to_linux_fstab - true, if this disk is added to Linux fstab, otherwise false

mounted - set 'true' to mount the disk inside OS automatically, otherwise set 'false'

You can use a single mounted parameter, to substitute the two add_to_linux_fstab andadd_to_freebsd_fstab parameters.

built - true if the disk is built, otherwise false

created_at - the date when the disk was created in the [YYYY][MM][DD]T[hh][mm][ss]Z format

updated_at - the date when the disk was updated in the [YYYY][MM][DD]T[hh][mm][ss]Z format

data_store_id - the ID of the data store this disk is located

disk_size - disk size in GB

disk_vm_number - the number of virtual servers using this disk

file_system - disk filesystem (ext3 or ext4)

id - the disk ID

identifier - disk identifier

is_swap - true if this is a swap disk, otherwise false

label - disk's label

locked - true if the disk is locked, otherwise false

mount_point - disk mount point.

primary - true if the disk is primary. Otherwise false.

virtual_machine_id - the ID of the virtual server using this disk

volume_id - data store ID

has_autobackups - true if the disk has automatic backups set up, otherwise false.

SolidFire - related parameters:

iqn - volume ISCSI quialified name

burst_bw - maximum bandwidth allowed set in MB/sec

max_bw -maximum bandwidth allowed set in MB/sec