1 out of 2 rated this helpful - Rate this topic

Reimage Role Instance

Updated: October 11, 2011

The Reimage Role Instance operation requests a reimage of a role instance that is running in a deployment.

The Reimage Role Instance operation is an asynchronous operation. To determine whether the Management service has finished processing the request, call Get Operation Status. For more information on asynchronous operations, see Tracking Asynchronous Service Management Requests.

Request

The Reimage Role Instance request may be specified as follows. Replace <subscription-id> with your subscription ID, <cloudservice-name> with the name of the cloud service, <deployment-slot> with staging or production, <deployment-name> with the name of your deployment, and <role-instance-name> with the name of your role instance.

 

Method Request URI HTTP Version

POST

https://management.core.windows.net/<subscription-id>/services/hostedservices/<cloudservice-name>/deploymentslots/<deployment-slot>/roleinstances/<role-instance-name>?comp=reimage

HTTP/1.1

POST

https://management.core.windows.net/<subscription-id>/services/hostedservices/<cloudservice-name>/deployments/<deployment-name>/roleinstances/<role-instance-name>?comp=reimage

HTTP/1.1

URI Parameters

 

URI Parameter Description

comp=reimage

Required. Specified that an instance of a role must be reimaged.

Request Headers

The following table describes the request headers.

 

Request Header Description

Content-Type

Required. Set this header to application/xml.

x-ms-version

Required. Specifies the version of the operation to use for this request. The value of this header must be set to 2010-10-28 or later. For more information about versioning headers, see Service Management Versioning.

ContentLength

Required. Must be set to 0.

Request Body

None.

Response

The response includes an HTTP status code and a set of response headers.

Because Reimage Role Instance is an asynchronous operation, you must call Get Operation Status to determine whether the operation is complete, has failed, or is still in progress.

Status Code

Because Reimage Role Instance is an asynchronous operation, it always returns status code 202 (Accept). To determine the status code for the operation once it is complete, call Get Operation Status. The status code is embedded in the response for this operation; if successful, it will be status code 200 (OK). For information about status codes, see Service Management Status and Error Codes.

Response Headers

The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

 

Response Header Description

x-ms-request-id

A value that uniquely identifies a request made against the Management service. For an asynchronous operation, you can call get operation status with the value of the header to determine whether the operation is complete, has failed, or is still in progress. See Tracking Asynchronous Service Management Requests for more information.

Response Body

None.

Authorization

Any management certificate associated with the subscription specified by <subscription-id> can be used to authenticate this operation. For additional details, see Authenticating Service Management Requests.

Remarks

Reimaging a role instance results in different behavior depending on the type of role:

  • For a web or worker role, when the role is reimaged, Windows Azure takes the role offline and writes a fresh installation of the Windows Azure guest operating system to the virtual machine. The role is then brought back online.

Windows Azure attempts to maintain data in any local storage resources when the role is reimaged; however, in case of a transient hardware failure, the local storage resource may be lost. If your application requires that this data be persisted in a guaranteed fashion, it is recommended that you write it to a durable data source, such as a Windows Azure drive.

Any data that is written to a local directory other than that defined by the local storage resource will be lost when the role is reimaged.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.