简体   繁体   English

在Azure中挂载CloudDrive快照时出错

[英]Error mounting CloudDrive snapshot in Azure

I've been running a cloud drive snapshot in dev for a while now with no probs. 我已经在dev中运行云驱动器快照已有一段时间了,没有问题。 I'm now trying to get this working in Azure. 我现在正在尝试使它在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. 我在Azure中同时运行了WorkerRole和Storage,因此与开发模拟环境的断开连接无关。

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. 最后的.Mount()方法现在失败了。

Please help as this has me royally stumped! 请帮忙,因为这使我陷入了困境!

Thanks in advance. 提前致谢。

Dave 戴夫

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...? 我所做的就是创建一个新容器并将其VHD上传到其中,因此我不确定旧容器是否发生了奇怪的事情……? 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. 我一生只有2天,永远都不会回来。 Debugging live Azure issues is an excruciatingly tedious process. 调试实时Azure问题是一个非常繁琐的过程。

It's a shame the Azure CloudDrive dev simulation doesn't more closely replicate the live environment. 遗憾的是,Azure CloudDrive开发人员模拟没有更紧密地复制实时环境。

One source of the D000000D InteropCloudDriveException is when the drive (or snapshot) being mounted is expandable rather than fixed size. D000000D InteropCloudDriveException的一种来源是所装载的驱动器(或快照)是可扩展的,而不是固定大小的。 Unfortunately, the MSDN documentation provides minimal information on restrictions, but this note is an excellent source of information: 不幸的是,MSDN文档只提供了很少的限制信息,但是此注释是很好的信息来源:

http://convective.wordpress.com/2010/02/27/azure-drive/ 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). 我可以证实Dave关于BLOB容器的发现(爱你,Dave,我只呆了一晚上)。

I also had problems debugging before changing BLOB container. 在更改BLOB容器之前,我也遇到了调试问题。

The error message I had was "there was an error attaching the debugger to the IIS worker process for url ...". 我收到的错误消息是“将调试器附加到url的IIS工作进程时出错...”。

Hope this helps some poor Azure dev, having a challenging time with the debugger. 希望这对一些可怜的Azure开发人员有所帮助,让他们在调试器中度过了艰难的时光。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM