Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

API Essentials

API Key Generation





Firewall Rules

Flex Cloud VM Control

Getting Started with Superb Flex Cloud

IP Addresses


Network Interfaces


SSH Keys


Test Route

Troubleshooting API Issues

Viewing Activity Logs

Virtual Server Operating Systems

Virtual Servers

VS Disks

POST /virtual_machines/:virtual_machine_id/disks 

Adds a new disk to specified virtual machine


Request Parameters

To add a new disk, send the following parameters:

data_store_id* - The ID of a data store where this disk is located

label - disk label

primary - set 1 if the disk is primary, otherwise set 0

disk_size* - the disk space in GB

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

mount_point - a physical location in the partition used as a root filesystem

hot_attach -set 1 to enable hot attachment, otherwise set 0. In this case virtual server will not be stopped when adding a disk.

min_iops - minimum number of  IO operations per second (this is a SolidFire related parameter)

add_to_linux_fstab -set true to add the disk to your Linux fstab file, otherwise set false

add_to_freebsd_fstab - set true to add the disk to your FreeBSD fstab file, otherwise set false

require_format_disk – set 1 to format disk, otherwise set 0

file_system - for Linux templates, you can choose ext4 file system instead of the ext3 default one. To set the file-system parameter, you must set the require_format_disk option

Response Parameters

JSON Request example

 curl -i -X POST http://onapp.test/virtual_machines/:virtual_machine_id/disks.json -d '{"disk":{"primary":"0","disk_size":"2","file_system":"ext4","data_store_id":"5","label":"qwerq", "require_format_disk":"1","mount_point":"/mnt/aaa","hot_attach":"1","min_iops":"600","add_to_linux_fstab":"true","add_to_freebsd_fstab":"false"}}' -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json'

JSON Response


XML Request example

 curl -i -X POST http://onapp.test/virtual_machines/:virtual_machine_id/disks.xml -d '<disk><primary>0</primary><disk_size>5</disk_size><file_system>ext4</file_system><data_store_id>5</data_store_id><mount_point>true</mount_point><hot_attach>1</hot_attach><min_iops>600</min_iops><is_swap>true</is_swap><require_format_disk>1</require_format_disk><add_to_linux_fstab>true</add_to_linux_fstab><add_to_freebsd_fstab>false</add_to_freebsd_fstab></disk>' -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml'

XML Response example

  • No labels