有时安装新软件需要花费很多时间。
我想在VM中安装软件,稍后在新VM中重复使用该软件。有两种方法可以做到这一点。
在第一种情况下,我只是直接从该映像创建一个新VM,在第二种情况下,我会在创建新VM后附加磁盘。
哪种方式更可取,最有可能?
答案 0 :(得分:0)
Let me try to address your two points below.
1) An image is really about creating a sys prepped [1] version from an existing Azure VM ( that presumably has all the software you need installed).
Once you have captured the image, you can then create additional VM(s) based on it.
You can also go Azure Marketplace or VM Depot [2] and choose from a set of pre-built images and easily spin VMs based on it. This is the quickest way to get up and running with a VM.
2)
A disk is created from an image when you provision a VM. By default an OS disk will be created. But if your image includes data disks those will also be added to the VM.
To your point, #2 allows you to attach additional data disks (number of disks you can attach depends on the size of the VM you are creating). Note that you can attach an empty or an existing disk.
[1] https://technet.microsoft.com/library/bb457073.aspx
[2] http://azure.microsoft.com/en-us/marketplace/virtual-machines/