Rebuild VS Network

To rebuild the network for a particular VS, use the following request:

POST /virtual_machines/:virtual_machine_id/rebuild_network.xml
POST /virtual_machines/:virtual_machine_id/rebuild_network.json

XML Request Example

curl -X POST -u user:userpass http://onapp.test/virtual_machines/12/rebuild_network.xml?force=1&shutdown_type=hard&required_startup=1' -H 'Accept: application/xml' -H 'Content-type: application/xml' 

JSON Request Example

curl -X POST -u user:userpass http://onapp.test/virtual_machines/12/rebuild_network.json?force=1&shutdown_type=hard&required_startup=1' -H 'Accept: application/json' -H 'Content-type: application/json'


virtual_machine_id - ID of the virtual server

shutdown_type - type of the VS shutdown: hard, graceful or soft

required_startup - set 1 to start up the VS automatically after build, otherwise set 0

force* - set 1 to specify the VS shutdown type ("shutdown_type") and whether VS should start up automatically after the reboot ("required_startup").

PLEASE NOTE: If the force reboot option is enabled, the system tries to enter the virtual server. Then, if the transaction fails, the virtual server will be rebooted.

In case the force reboot option is disabled and system can not enter the virtual server, the network rebuild operation will fail.