ERROR_UNSUPPORTED_OS seen with Windows Azure Drives

ERROR_UNSUPPORTED_OS seen with Windows Azure Drives

  • Comments 4

When running in the cloud, a few customers have reported that CloudDrive.InitializeCache() and CloudDrive.Mount() occasionally fail with ERROR_UNSUPPORTED_OS when running with SDK 1.3.   This error can occur when your service calls a CloudDrive API before the Azure CloudDrive service has been started by the operating system. In older versions of the SDK, your application was started later, so the Azure CloudDrive service would have already been running.

We will fix this issue in a future release. In the meantime, we recommend working around the issue by retrying the first CloudDrive API your service calls. The following is an example of code that retries the CloudDrive.InitializeCache() operation.   A similar loop should be placed around any CloudDrive APIs that your application may call first, including CloudDrive.Create, CloudDrive.Mount, and/or CloudDrive.GetMountedDrives.

For (int i = 0; i < 30; i++)
{
       try
       {
           CloudDrive.InitializeCache(localCache.RootPath,localCache.MaximumSizeInMegabytes);
           break;                   
       }
       catch (CloudDriveException ex)
       {
           if (!ex.Message.Equals("ERROR_UNSUPPORTED_OS") || i == 29)
                 throw;
           Thread.Sleep(10000);
       }
}

Windows Azure Storage team

Leave a Comment
  • Please add 6 and 1 and type the answer here:
  • Post
  • I keep getting this exception and this solution doesn't solve the problem (event after 30 tries)

  • Hi Sandeep,

    Could you provide the following information?

    - Are you running a VM role, worker role, or web role?

    - Where are you placing the above retry loop?

    - Which CloudDrive API did you call inside the retry loop?

    - Which Azure Guest OS version is your application using?

    - Are you using SDK 1.3?

    You can email me at ricliu_at_microsoft_dot_com.

    Thanks,

    Richard

  • Have it been fixed in 1.5?

  • Hi Rafiki,

    We have made some improvements, but there is still a chance of seeing this, so we still recommed putting this loop in your code.

    Thanks

    Andrew Edwards

    Windows Azure Storage

Page 1 of 1 (4 items)