Question

I've been running a cloud drive snapshot in dev for a while now with no probs. I'm now trying to get this working in Azure.

I can't for the life of me get it to work. This is my latest error:

Microsoft.WindowsAzure.Storage.CloudDriveException: Unknown Error HRESULT=D000000D --->

Microsoft.Window.CloudDrive.Interop.InteropCloudDriveException: Exception of type 'Microsoft.WindowsAzure.CloudDrive.Interop.InteropCloudDriveException' was thrown.

   at ThrowIfFailed(UInt32 hr)

   at Microsoft.WindowsAzure.CloudDrive.Interop.InteropCloudDrive.Mount(String url, SignatureCallBack sign, String mount, Int32 cacheSize, UInt32 flags)

   at Microsoft.WindowsAzure.StorageClient.CloudDrive.Mount(Int32 cacheSize, DriveMountOptions options)

Any idea what is causing this? I'm running both the WorkerRole and Storage in Azure so it's nothing to do with the dev simulation environment disconnect.

This is my code to mount the snapshot:

        CloudDrive.InitializeCache(localPath.TrimEnd('\\'), size);

        var container = _blobStorage.GetContainerReference(containerName);
        var blob = container.GetPageBlobReference(driveName);

        CloudDrive cloudDrive = _cloudStorageAccount.CreateCloudDrive(blob.Uri.AbsoluteUri);
        string snapshotUri;
        try
        {
            snapshotUri = cloudDrive.Snapshot().AbsoluteUri;

            Log.Info("CloudDrive Snapshot = '{0}'", snapshotUri);
        }
        catch (Exception ex)
        {
            throw new InvalidCloudDriveException(string.Format(
                    "An exception has been thrown trying to create the CloudDrive '{0}'. This may be because it doesn't exist.",
                    cloudDrive.Uri.AbsoluteUri), ex);
        }

        cloudDrive = _cloudStorageAccount.CreateCloudDrive(snapshotUri);

        Log.Info("CloudDrive created: {0}", snapshotUri, cloudDrive);

        string driveLetter = cloudDrive.Mount(size, DriveMountOptions.None);

The .Mount() method at the end is what's now failing.

Please help as this has me royally stumped!

Thanks in advance.

Dave

Was it helpful?

Solution

I finally got this to work last night. All I did was create a new container and upload my VHD to it so I'm not sure if there was something weird going on with the old container...? Can't think what. The old container must've been getting a bit long in the tooth..!?!

2 days of my life I'll never get back. Debugging live Azure issues is an excruciatingly tedious process.

It's a shame the Azure CloudDrive dev simulation doesn't more closely replicate the live environment.

OTHER TIPS

One source of the D000000D InteropCloudDriveException is when the drive (or snapshot) being mounted is expandable rather than fixed size. Unfortunately, the MSDN documentation provides minimal information on restrictions, but this note is an excellent source of information:

http://convective.wordpress.com/2010/02/27/azure-drive/

I can confirm Dave's findings regarding the BLOB container (Love you Dave, I only spent one evening).

I also had problems debugging before changing BLOB container.

The error message I had was "there was an error attaching the debugger to the IIS worker process for url ...".

Hope this helps some poor Azure dev, having a challenging time with the debugger.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top