Repair a VM Role [SPFSDK][VMROLE]
Applies To: Windows Azure Pack
At times a VM role may at times fail to provision or update. This will require that you fix the problem and then start the Repair operation on the VM role. For more information about investigating VM role errors see Inspect a VM Role for Provisioning Errors [SPFSDK][VMROLE].
The repair operation is available at the VM role instance URI: http://server-name:server-port/subscription-id/CloudServices/cloudservice-name/Resources/MicrosoftCompute/VMRoles/vmrole-name/Repair?api-version=2013-03. The HTTP body of the request should be a JSON object with a single property named Skip. The value of this property should be true or false. When true, this will allow the provisioning to skip the existing virtual machine instance that caused the error while being provisioned and continue on to the next, if any, virtual machine to be created. If it is false, the last virtual machine provisioned (which caused the error) will try again.
Submit an HTTP POST request to the server URI referenced above.
Tip |
|---|
For more information about the placeholders used in the URL, see URL Cheat Sheet for VM Roles [SPFSDK][VMROLE]. |
Important |
|---|
Anytime you access a resource within cloud services, you must append the api-version=2013-03 query string. The query string always starts with the ? character after the URL. |
Repair a VM role with HTTP
Use a GET HTTP operation.
Set the URI of the HTTP operation to the format previously described.
Set the x-ms-principal-id header to the email of the tenant associated with the current subscription.
If you want to use json as the response type add the Accept header and set the value to application/json
Set any other standard HTTP headers, such as those related to authentication tokens, and add any authentication certificates that may be required.
Create the HTTP request body, which should be a JSON object.
Create a property on the JSON object named Skip and set the value to either true or false.
Submit the request.
POST https://smapi-server:30005/f86b0bc2-6825-4e5b-961b-10d5901f7572/CloudServices/cloudservice1/Resources/MicrosoftCompute/VMRoles/vmrole1/Repair?api-version=2013-03 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InhUOE1XSFJ0aDVGVmNNSS1CTWlqWTc1Q1dhOCJ9.eyJpc3MiOiJodHRwOi8vYXp1cmVzZXJ2aWNlcy9BdXRoU2l0ZSIsImF1ZCI6Imh0dHA6Ly9henVyZXNlcnZpY2VzL1RlbmFudFNpdGUiLCJuYmYiOjEzODUwNzYyODUsImV4cCI6MTM4NTEwNTA4NSwidXBuIjoiZnJlZEBmcmVkLmNvbSIsImF1dGhfdGltZSI6IjIwMTMtMTEtMjFUMjM6MjQ6NDUuMDU1WiIsImF1dGhtZXRob2QiOiJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvYXV0aGVudGljYXRpb25tZXRob2QvcGFzc3dvcmQifQ.waytWrMR-pdqPCzqw9mKKSO-vGgucTbcWzf6ZcmDRAsNGsIt_yyrd1fhD3J8PDex5wbBP0GGZgvfLZ04Jc8jPCn2rZXgSm25Zl9JOn1pihaGkL7zUUHo1pLPWHes9opBmqJfGHL_4vMdinu0GJ2zWlEEZ_iff1Ro2se9XJA8l8MxAB0DnDx8mJqPJZMvZtczwXpdoiH8lzESeKHmyaACMX4kNZwUGPNQPY5-7cCfmltbdhkYv5_vu0XkwKYJwR_TyUWgq-KzBv3FfcAeNEtt-S3RtGqKaplXEinVpPwY8A-V1cU93dcDewusGP-PidoEXvGVq6GIN-epdwg83p14og
x-ms-principal-id: user@contoso.com
Accept: application/json
Content-Type: application/json
Host: smapi-server:30005
Content-Length: 17
Expect: 100-continue
{ "Skip": false }
HTTP/1.1 204 No Content Cache-Control: no-cache Content-Length: 0 Server: Microsoft-IIS/8.5 x-ms-request-id: 40f2fe03-c9a8-42bb-8b19-2878c7a51819 X-Content-Type-Options: nosniff request-id: 33c9dafc-df0d-0001-385d-ca330ddfce01 DataServiceVersion: 1.0; Server: Microsoft-IIS/8.5 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET X-Powered-By: ASP.NET Date: Thu, 21 Nov 2013 23:24:50 GMT

