none
stop/start VM using Windows Azure Service management REST API RRS feed

  • Question

  • Hi Azure experts,

    I have VM in my subscription which is shutdown.

    I also created a certificate using makecert cmdlet and upload the same in cloud service certificate section of classic vm.

    I followed the code given in blog below for start / stop the azure vm using azure service management rest api.

    https://code.msdn.microsoft.com/windowsapps/How-to-start-deallocated-c23b7cbe

    in my case,

    uri syntax for start role: https://management.core.windows.net/<subscription-id>/services/hostedservices/<service-name>/deployments/<deployment-name>/roleinstances/<role-name>/Operations 

    terms used in url and it's corresponding value.

    subscription-id - subscription id of mine get it from portal 

    cloudservice-name - name of cloud service can get it from azure portal

    deployment-name - deploymentid which is available in cloud service dashboard section

    role-name - azure vm name get it from portal

    and request body for this post url is,

    <StartRoleOperation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <OperationType>StartRoleOperation</OperationType>
    </StartRoleOperation>


    i'm getting below error,

    The remote server returned an error: (404) Not Found.

    Anybody if tried the same kind of rest api. Please review the above and suggest me why i'm getting the error.

    Thanks,


    Thanks, SaravanaBharathi.A

    Wednesday, October 12, 2016 4:52 PM

All replies

  • Hello Saravana,

    Thank you for posting on the Azure forums.

    We are checking on this issue and will get back to you at the earliest. We appreciate your time and patience.

    Regards,

    Loydon

    Thursday, October 13, 2016 2:19 PM
  • Saravana,

    One thing I noticed with some of the REST apis is they can be case sensitive.  Be sure to check case for the cloud service name and role name especially.

    Ralph

    Thursday, February 9, 2017 7:02 PM
  • Any success you got? I am stuck with same kind of issue 
    Tuesday, October 30, 2018 5:28 AM