Build or Rebuild VS
Note that rebuild is not supported for OVA virtual servers.
To build or rebuild a VS, use the following request:
POST /virtual_machines/:virtual_machine_id/build.xml
POST /virtual_machines/:virtual_machine_id/build.json
XML Request Example
curl -i -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass -d '<virtual_machine><template_id>1</template_id><required_startup>1</required_startup></virtual_machine>' --url http://onapp.test/virtual_machines/12/build.xml
JSON Request Example
curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass -d '{"virtual_machine":{"template_id":"1","required_startup":"1"}}' --url http://onapp.test/virtual_machines/12/build.json
Where:
template_id* - the ID of a template from which a VS should be built.
required_startup - set to 1 if you wish to start a VS after it is built. Otherwise set to 0.
initial_root_password_encryption_key - specify the password encryption passphrase
for Windows templates you should specify the licensing type:
licensing_type - the type of a license: mak, kms or user own license
licensing_key - the key of a license, required if you have selected OWN licensing type, and not required for MAK and KMS licensing types
licensing_server_id - the ID of a template group where the KMS server details are indicated and to which the template belongs (either directly or through the child group)