Reboot server

Method URI Description
POST /v2/{tenant_id}/servers/{server_id}/action Reboots the specified server. Specify the reboot action in the request body.

Normal response codes: 202

CAUTION:

  • When an instance created using a Linux image is restarted, the sshd settings are initialized, and it may no longer be possible to log in to the instance. If the sshd settings have been changed, execute the following commands with administrator privileges before restarting the instance.
    
    # chkconfig cloud-init-local off
    # chkconfig cloud-init off
    # chkconfig cloud-config off
    # chkconfig cloud-final off
               
  • If retrieval of metadata fails, the initial user password may be locked.

    By configuring the setting below, the password will no longer be locked from the next restart.

    • Deploy the cloud-init configuration file.
      
      # cat << EOF > /etc/cloud/cloud.cfg.d/datasource.cfg
      datasource_list: ['OpenStack']
      EOF
                   

Request

This table shows the URI parameters for the reboot server request:

Name Type Description
{tenant_id} UUID Project ID
{server_id} UUID The UUID for the server.

This table shows the body parameters for the reboot server request:

Name Type Description
type String Specifies SOFT or HARD reboot. A SOFT reboot signals the operating system to restart, which allows for graceful shutdown of all processes. A HARD reboot is equivalent to power cycling the server. This parameter is ignored in Compute where a HARD reboot is always performed.

Example. Reboot server: JSON request


{
	"reboot": {
		"type": "SOFT"
	}
}
     

Response

This operation does not return a response body.