虚拟机上的Azure相同的存储 [英] Azure Same Storage on VM

查看:129
本文介绍了虚拟机上的Azure相同的存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打20的虚拟计算机,我想下载它们相同的文件,但它会花费很长的时间才能得到他们中的每一个,下载相同的文件。有反正我可以有已经下载的,我会创造,所以我的其他虚拟机的文件,不必重新下载每个单一?


解决方案

我不知道,我知道你想要做什么。

如果你想创建一个软件基地的形象,所有虚拟机将共享,你应该能够建立一个单一的虚拟机,然后SYS preP图像,捕捉它,并用它旋转起来新的虚拟机具有相同的配置。

如果你想有一个共享数据存储,那是什么表,BLOB和SQL存储帐户的。 :)

我不认为你可以读/写同时在同一磁盘多个虚拟机,但是。这是没有意义的。虚拟机是机器,想象一下会发生什么,如果你同时运行10台机器关在同一个硬盘和相同的OS请在安装有该机器的使用资源的同步,以避免踩遍对方没有切实可行的办法。


编辑:

如果你正在试图做的一切都是共享一些数据,你不一个应用程序的工作(其中使用Azure存储类似表格或斑点会去的方式),但只是为下载一些基础设施,或诸如此类的东西,我有几个想法。情理之中的事情要看您的具体方案。

网络共享


  1. 创建一个空在你的虚拟机的一个数据磁盘。不要忘了初始化磁盘第一,就像你有一个真正的空白硬盘。

  2. 下载内容到数据磁盘。 (我分配驱动器字母S:对共享)

  3. 同时下载,启用了分享,他们正在下载到的文件夹。假设窗口2012:

    1. 我创建的文件夹S:\\下载\\。

    2. I R-点击在S:在Windows资源管理器\\下载,就到了分享>菜单,并选择了特定的人......

    3. 我把所有人的对话框中,用只读访问共享。 <<此没有特别的安全。我离开一个更完善的ACL'd交流经验作为一个练习OP。

    4. 我点击分享,并证实了UAC提示。


  4. Azure是默认安全​​,所以份额不会B / C端口未开放工作还没有。捅在防火墙共享一个洞。从管理员控制台提示: netsh防火墙设置服务类型= fileandprint模式=启用配置=电流

  5. 的Azure还保证你的虚拟机在网络环境中。你必须创建端点启用网络访问,则可以从该是开放共享的虚拟门户做到这一点。创建以下两个端点:

    1. NetBIOSSession,TCP端口139(内部和外部)

    2. SMB,TCP端口445(内部和外部)


在这一点上,你的所有其他虚拟机应该能够通过任一共享虚拟机DNS名称或VIP地址(在VM上的门户信息中心提供)来访问有问题的份额。访问应该是非常快的,因为你分享你的大数据数据中心(S)内。

数据磁盘

我还没有实际做这个我自己,所以一些独立的工作是必需的。概括地说:

您可以上传任意的.vhd到云中,并创建一个数据磁盘出来,所以在本地VM上次我检查添加一个新的静态的磁盘(Azure不导入动态的VHD )并下载你想要的一切VHD。然后上传VHD到存储,并从上传的磁盘映像打印出的数据硬盘上为每个虚拟机。完成!

将SYS prep'd图片

如果我们谈论的是想成为每个VM安装(而不是某种形式的专门的数据)的十几个不同的应用,我仍然认为SYS prep'd形象是要走的路。它看起来像有一个错误,现在,这样的记录的HOWTO已经暂时撤下赞成<一个href=\"http://social.msdn.microsoft.com/Forums/windowsazure/en-US/fafb9ee6-1e57-46ba-8440-27467ad986cf/image-capture-issue-vm-unexpectedly-started-after-guestinitiated-shutdown\"相对=nofollow>一个论坛帖子描述的解决方法。它看起来像关键外卖是从门户网站关闭您的虚拟机后,它一直SYS prep'd,而不是从VM中。

希望这会有所帮助,祝你好运!

I want to make 20 Virtual Computers and I want to download same files on them, however it will take too long time to get on each one of them and download the same files. Is there anyway I can have the files already downloaded on the other Virtual machines that I will create so I don't have to re-download on each single one?

解决方案

I'm not sure that I understand what you're trying to do.

If you want to create a base image of software that all your VMs will share, you should be able to set up a single virtual machine, then sysprep the image, capture it, and use that to spin up new virtual machines with the same configuration.

If you want a shared data store, thats what Table, Blob, and SQL storage accounts are for. :)

I don't think you can make multiple VMs that read/write the same disk simultaneously, however. That doesn't make sense. VMs are machines, imagine what would happen if you were simultaneously running 10 machines off the same hard drive and the same os install- there's no practical way for the machines to synchronize their use of the resource to avoid stomping all over each other.


EDIT:

If all you're trying to do is share some data and you're not working with an app (where using Azure Storage like tables or blobs would be the way to go), but just with downloads for some infrastructure or whatnot, I have a couple ideas. What makes sense depends on your specific scenario.

The Network Share

  1. Create an empty data disk on one of your VMs. Don't forget to initialize the disk first, just as you would with a real blank HDD.
  2. Download your content to that data disk. (I assigned drive letter S: for Shared)
  3. While downloading, enable sharing on the folder that they're being downloaded to. Assuming windows 2012:

    1. I created the folder "S:\Downloads\".
    2. I R-clicked on S:\Downloads in Windows Explorer, went to the "Share With >" menu, and selected "Specific people...".
    3. I put "Everyone" in the dialog and shared with Read Only access. << This is not particularly secure. I leave a more well-ACL'd sharing experience as an exercise for the OP.
    4. I clicked "Share" and confirmed the UAC prompt.

  4. Azure is secure by default, so the share won't work yet b/c ports haven't been opened. Poke a hole in your firewall for sharing. From an administrator console prompt: netsh firewall set service type=fileandprint mode=enable profile=current.
  5. Azure also secures your VM in the network environment. You'll have to create endpoints to enable network access, you can do this from the portal on the VM that is opening up the share. Create the following two endpoints:

    1. NetBIOSSession, tcp, port 139 (internal and external)
    2. SMB, tcp, port 445 (internal and external)

At this point, all your other VMs ought to be able to access the share in question via either the sharing VMs DNS name or VIP address (available on your VM's dashboard in the portal). The access ought to be very fast because you're sharing your large data set within the datacenter(s).

The Data Disk

I haven't actually done this myself, so some independent work will be required. Nutshell:

You can upload an arbitrary .vhd to the cloud and create a data disk out of it, so on a local VM add a new static disk (Azure doesn't import dynamic vhds last I checked) and download everything you want to that VHD. Then upload that VHD to your storage and print out a data disk for every VM from the disk image that you uploaded. Done!

The Sysprep'd Image

If we're talking about a dozen different applications that want to be installed on every VM (as opposed to some form of specialized data), I still think the sysprep'd image is the way to go. It looks like there's a bug right now, so the howto of record has been temporarily taken down in favor of a forum post describing the workaround. It looks like the key takeaway is to shutdown your VM from the portal after it's been sysprep'd, not from within the vm.

Hope this helps, good luck!

这篇关于虚拟机上的Azure相同的存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆