简体   繁体   English

Windows Azure VM角色上载

[英]Windows Azure VM role upload

This question is related to Azure VM Role. 此问题与Azure VM角色有关。 As I read in some blogs, to host a VM Role we need to create a Virtual Machine image (VHD) with Windows Server 2008 r2 installed in it. 正如我在一些博客中所读到的,为了托管VM角色,我们需要在其中安装带有Windows Server 2008 r2的虚拟机映像(VHD)。

1.) So what will be the size of the VHD file (roughly)? 1.)那么VHD文件的大小(大致)是多少?

2.) I guess it will be in GBs for sure. 2.)我想这肯定会在GB中。 So can it be avoided with any other methods so that we can create it on fly, I mean in the cloud environment itself. 所以可以通过任何其他方法避免它,以便我们可以在飞行中创建它,我的意思是在云环境本身。 So that uploading such a huge file is avoided. 这样就可以避免上传如此庞大的文件。

I will add more info to what David provided. 我将为David提供更多信息。 Please check the link below title "Why Would I Use a VM Role in My Application?" 请检查以下标题“我为什么要在我的应用程序中使用VM角色?” because you must be sure why you go down to "VM Role" Path: 因为您必须确定为什么要进入“VM角色”路径:

http://msdn.microsoft.com/en-us/library/windowsazure/gg671911.aspx http://msdn.microsoft.com/en-us/library/windowsazure/gg671911.aspx

Next to answer exactly your question: 接下来回答你的问题:

1) the Size of VHD is defined by the type of VM Role Instance you will use. 1)VHD的大小由您将使用的VM角色实例的类型定义。 The maximum VHD logical size support is 64GB. 最大VHD逻辑大小支持为64GB。 Depend on your VM Role Instance type "Extra Small, Small, Medium, Large and Extra Large" you can use 15GB with Extra Small, 35GB with Small and 64GB with Medium, Large and Extra Large. 根据您的VM角色实例类型“超小,小,中,大和超大”,您可以使用15GB的超小型,35GB的小型和64GB的中型,大型和超大型。

2) As of now VM Role is still in BETA and you must have to create a VHD locally using Windows Server Hyper-V and must have Windows Server 2008 installed on it. 2)截至目前,VM Role仍在BETA中,您必须使用Windows Server Hyper-V在本地创建VHD,并且必须在其上安装Windows Server 2008。

You can follow step by step Hands on Lab below if you wish to dive into: 如果您想深入了解,可以按照下面的“动手实验”进行操作:

http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_vmrolelab_topic2#_Toc308775050 http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_vmrolelab_topic2#_Toc308775050

This is how it works today: You create your VHD in Hyper-V locally, then upload the image, which is subsequently used for VM Role deployment and scaling. 这就是它今天的工作原理:您在本地Hyper-V中创建VHD,然后上载映像,该映像随后用于VM角色部署和扩展。 It's hard to predict the actual VHD size, as this largely depends on what you're installing on your VM. 很难预测实际的VHD大小,因为这在很大程度上取决于您在VM上安装的内容。 I'm sure you can easily create images upward of 10+ GB. 我相信你可以轻松创建超过10 GB的图像。

Once you have your image uploaded, you don't need to re-upload the entire image if, say, you patch your VM. 上传图像后,如果修补VM,则无需重新上传整个图像。 You can upload a differencing disk, which would be considerably smaller. 您可以上传差异磁盘,这将相当小。

One thing to remember: Any change you make to the VM at runtime in Windows Azure will be non-persistent. 需要记住的一点是:在Windows Azure中对运行时VM所做的任何更改都将是非持久性的。 For instance, if the VM crashes and has to be rebuilt, it is rebuilt from your originally-uploaded VHD. 例如,如果VM崩溃并且必须重建,则会从最初上载的VHD重建。

Now... having said all that: You should carefully consider using a VM Role over Web and Worker roles (which are essentially Windows Server 2008 with and without IIS running, respectively). 现在......说了这么多:你应该仔细考虑使用VM角色而不是Web角色和角色(分别是运行和不运行IIS的Windows Server 2008)。 With startup tasks that may run with elevated permissions, you can install nearly anything that you'd normally install on Windows Server. 使用可能以提升的权限运行的启动任务,您几乎可以安装通常在Windows Server上安装的任何内容。 There are three primary reasons to go with VM Role: VM角色有三个主要原因:

  • You have software to install, but the installation cannot be automated 您有要安装的软件,但安装无法自动完成
  • You can automate the install, but it takes too long (say, more than 5-10 minutes) 您可以自动安装,但需要太长时间(例如,超过5-10分钟)
  • You can automate the install, but it's an unreliable install 您可以自动安装,但这是一个不可靠的安装

If you can avoid VM Role, you can avoid the VM upload and subsequent VM maintenance, and outsource OS management to Windows Azure. 如果可以避免VM角色,则可以避免VM上载和后续VM维护,并将OS管理外包给Windows Azure。

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

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