Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure provider calls "restart" instead of "start" for start instance, which fails #69

Closed
PierreBeucher opened this issue Nov 28, 2024 · 1 comment

Comments

@PierreBeucher
Copy link
Owner

https://github.com/PierreBeucher/cloudypad/blob/129254ccb74b5808f57662bf3deb2e5c8ab67a53/src/providers/azure/runner.ts#L40C1-L46C6

start azure
2024-11-28 17:54:45.109	ERROR	/dist/src/tools/azure.js:83	azure	Failed to restart virtual machine azure-vmaeab7b8c:

 RestError  The operation requires the VM to be running (or set to run)., RestError, OperationNotAllowed, 409, [object Object], [object Object], [object Object]
error stack:
  • deserializationPolicy.ts	handleErrorResponse
	/node_modules/@azure/core-client/src/deserializationPolicy.ts:255
  • deserializationPolicy.ts	deserializeResponseBody
	/node_modules/@azure/core-client/src/deserializationPolicy.ts:159
  • task_queues	processTicksAndRejections
	internal/process/task_queues:95
Error starting instance azure: RestError: The operation requires the VM to be running (or set to run). 
 {
  "name": "RestError",
  "code": "OperationNotAllowed",
  "statusCode": 409,
  "details": {
    "error": {
      "code": "OperationNotAllowed",
      "message": "The operation requires the VM to be running (or set to run)."
    }
  },
  "request": {
    "url": "https://management.azure.com/subscriptions/0dceb5ed-9096-4db7-b430-2609e7cc6a15/resourceGroups/CloudyPad-azure/providers/Microsoft.Compute/virtualMachines/azure-vmaeab7b8c/restart?api-version=2024-03-01",
    "headers": {
      "accept": "application/json",
      "accept-encoding": "gzip,deflate",
      "user-agent": "azsdk-js-arm-compute/22.0.0 core-rest-pipeline/1.16.3 Node/20.16.0 OS/(x64-Linux-6.6.34)",
      "x-ms-client-request-id": "ca985abd-5c9f-43d5-b5bc-febe21c702f2",
      "authorization": "REDACTED"
    },
    "method": "POST",
    "timeout": 0,
    "disableKeepAlive": false,
    "streamResponseStatusCodes": {},
    "withCredentials": false,
    "requestId": "ca985abd-5c9f-43d5-b5bc-febe21c702f2",
    "allowInsecureConnection": false,
    "enableBrowserStreams": false
  }
}

@PierreBeucher
Copy link
Owner Author

#70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant