views:

48

answers:

1

Hi,

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

A: 

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.

Dave