Manage the Availability of Virtual Machines

You can ensure the availability of your application by using multiple Windows Azure Virtual Machines. By using multiple virtual machines in your application, you can make sure that your application is available during local network failures, local disk hardware failures, and any planned downtime that the platform may require.

You manage the availability of your application that uses multiple virtual machines by adding the machines to an availability set. Availability sets are directly related to fault domains and update domains. A fault domain in Windows Azure is defined by avoiding single points of failure, like the network switch or power unit of a rack of servers. In fact, a fault domain is closely equivalent to a rack of physical servers. When multiple virtual machines are connected together in a cloud service, an availability set can be used to ensure that the machines are located in different fault domains. The following diagram shows two availability sets with two virtual machines in each set.

Windows Azure periodically updates the operating system that hosts the instances of an application. A virtual machine is shut down when an update is applied. An update domain is used to ensure that not all of the virtual machine instances are updated at the same time. When you assign multiple virtual machines to an availability set, Windows Azure ensures that the machines are assigned to different update domains. The previous diagram shows two virtual machines running Internet Information Services (IIS) in separate update domains and two virtual machines running SQL Server also in separate update domains.

You should use a combination of availability sets and load-balancing endpoints to help ensure that your application is always available and running efficiently. For more information about using load-balanced endpoints, see Load Balancing Virtual Machines.

This task includes the following steps:

Step 1: Create a virtual machine and an availability set

To create an availability set that contains virtual machines, you can create the first virtual machine and the availability set at the same time, and then you can add virtual machines to the availability set as you create them. You can also create virtual machines, create an availability set, and then add all of the machines to the set.

To create a virtual machine and availability set

  1. If you have not already done so, sign in to the Windows Azure Management Portal.

  2. On the command bar, click New.

  3. Click Virtual Machine, and then click From Gallery.

    The Select the virtual machine operating system dialog box appears.

  4. From Platform Images, select an image and then click the arrow to continue.

    The Virtual machine configuration dialog box appears.

  5. In Virtual Machine Name, type the name that you want to use for the virtual machine.

  6. In New User Name, type a name for the administrative account that you want to use to manage the server.

  7. In New Password, type a strong password for the administrative account. In Confirm Password, retype the password that you previously entered.

  8. In Size, select the size that you want to use for the virtual machine. The size that you select depends on the number of cores that are needed for your application.

  9. Click the arrow to continue.

    The Virtual machine mode dialog box appears.

  10. Choose Stand-alone virtual machine.

  11. In DNS Name, type a name for the cloud service that is created for the machine. The name can contain from 3 through 24 lowercase letters and numbers.

  12. In Storage Account, select a storage account where the .vhd file is stored, or you can select to have a storage account automatically created. Only one storage account per region is automatically created. All other virtual machines that you create with this setting are located in this storage account. You are limited to 20 storage accounts.

  13. In Region/Affinity Group/Virtual Network, select region, affinity group, or virtual network that you want to contain the virtual machine. For more information about affinity groups, see About Affinity Groups for Virtual Network.

  14. Click the arrow to continue.

    The Virtual machine options dialog box appears.

  15. In Availability Set, select Create availability set.

  16. In Availability Set Name, enter the name for the availability set.

  17. Click the arrow to create the virtual machine and the availability set.

    From the dashboard of the new virtual machine, you can click Configure and see that the virtual machine is a member of the new availability set.

Step 2: Add a virtual machine to the cloud service and assign it to the availability set during the creation process

The previous step showed you how to create a virtual machine and availability set at the same time. You can now create a new virtual machine, connect it to the cloud service of the first virtual machine, and then add it to the availability set that you previously created.

To connect a new virtual machine and add it to the availability set

  1. If you have not already done so, sign in to the Windows Azure Management Portal.

  2. On the command bar, click New.

  3. Click Virtual Machine, and then click From Gallery.

    The Select the virtual machine operating system dialog box appears. You can now select an image from the Image Gallery.

  4. Click Platform Images, select the platform image that you want to use, and then click the arrow to continue.

    The Virtual machine configuration dialog box appears.

  5. In Virtual Machine Name, type the name that you want to use for the virtual machine.

  6. 6.In New User Name, type a name for the administrative account that you want to use to manage the server.

  7. In New Password, type a strong password for the administrative account on the virtual machine. In Confirm Password, retype the password.

  8. In Size, select the size that you want to use for the virtual machine. The size that you select depends on the number of cores that are needed for your application.

  9. For a virtual machine running the Linux operating system, you can select to secure the machine with an SSH Key.

  10. Click the arrow to continue.

    The Virtual machine mode dialog box appears.

  11. Select Connect to existing Virtual Machine to create a new virtual machine that will be connected with the first virtual machine in the availability set. Select the cloud service that contains the virtual machine in the availability set.

  12. In Storage Account, select a storage account where the VHD file is stored.

  13. In Region/Affinity Group/Virtual Network, select region that you want to contain the virtual machine.

  14. Click the arrow to continue.

    The Virtual machine options dialog box appears.

  15. Select the availability set that was created when you created the first virtual machine.

  16. Click the check mark to create the connected virtual machine and add it to the availability set.

    From the dashboard of the new virtual machine, you can click Configure and see that the virtual machine is a member of the new availability set.

Step 3: (Optional) Create an availability set for previously created virtual machines

You can create an availability set and add a virtual machine to it after you create the machine. After you create a virtual machine, you can configure the size of the machine and whether it is a member of an availability set.

To create a new availability set

  1. If you have not already done so, sign in to the Windows Azure Management Portal.

  2. Click Virtual Machines, and then select the virtual machine that you want to configure.

  3. Click Configure.

  4. In the Availability Set section, select Create Availability Set, and then enter a name for the set.

  5. Click Save.

    Note: This might result in the virtual machine being restarted to finalize the membership in the availability set.

Step 4: (Optional) Add a previously created virtual machine to an availability set

You can easily add an existing virtual machine to an availability set that was previously created. To add a virtual machine to an availability set, it must connected to the same cloud service as the other virtual machines in the set. For more information about connecting virtual machines, see How to Connect Virtual Machines in a Cloud Service.

To add an existing virtual machine to an availability set

  1. If you have not already done so, sign in to the Windows Azure Management Portal.

  2. Click Virtual Machines, and then select the virtual machine that you want to add to the availability set.

  3. Click Configure.

  4. In the Availability Set section, select the availability set that you previously created.

  5. Click Save.

    Note: This might result in the virtual machine being restarted to finalize the membership in the availability set.

[Windows Azure] Manage the Availability of Virtual Machines的更多相关文章

  1. [Windows Azure] About Affinity Groups for Virtual Network

    Affinity groups are the way to group the services in your Windows Azure subscription that need to wo ...

  2. Using Windows Server 2012 Backup for Hyper-V Virtual Machines. Error 80780176 - The specified component was not reported by the VSS writer.

    https://social.technet.microsoft.com/Forums/windowsserver/en-US/1a1e0066-f421-43d6-970b-1e20e674cdf9 ...

  3. [SQL in Azure] High Availability and Disaster Recovery for SQL Server in Azure Virtual Machines

    http://msdn.microsoft.com/en-us/library/azure/jj870962.aspx Microsoft Azure virtual machines (VMs) w ...

  4. [SQL in Azure] Getting Started with SQL Server in Azure Virtual Machines

    This topic provides guidelines on how to sign up for SQL Server on a Azure virtual machine and how t ...

  5. [Windows Azure] How to Scale an Application

    How to Scale an Application To use this feature and other new Windows Azure capabilities, sign up fo ...

  6. [Windows Azure] Load Balancing Virtual Machines

    Load Balancing Virtual Machines All virtual machines that you create in Windows Azure can automatica ...

  7. [New Portal]Windows Azure Virtual Machine (22) 使用Azure PowerShell,设置Virtual Machine Endpoint

    <Windows Azure Platform 系列文章目录> 我们可以通过Windows Azure Management Portal,打开Virtual Machine的Endpoi ...

  8. [SQL in Azure] Provisioning a SQL Server Virtual Machine on Azure

    http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-provision-sql-server/ Provi ...

  9. [Windows Azure] Walkthrough to Configure System Center Management Pack for Windows Azure Fabric Preview for SCOM 2012 SP1 (with a MetricsHub Bonus)

    The wait is finally over. This is a huge update to the Azure Management Pack over the one that was r ...

随机推荐

  1. 不可不知的Oracle常用技巧

    不可不知的Oracle常用技巧 表复制 1.方法一:复制表结构和数据 create table temp_clientloginuser as select distinct userid from ...

  2. com.android.providers.telephony.MmsSmsDatabaseHelper

    SmsProvider, MmsProvider, MmsSmsProvider利用MmsSmsDatabaseHelper来操作数据库. 1. MmsSmsDatabaseHelper继承了SQLi ...

  3. java获取n个工作日后的日期, 排除周末和节假日(顺延)

    一.写在前面 需求: 工作需要获取n个工作日后的日期, 需要排除weekend和holiday, holiday存在数据库中, 存入的形式是一个节日有起始日期和截止日期(以下文中有关于节假日的表截图) ...

  4. java struts2入门学习---自定义类型转换

    自定义类型转换器的作用就是将struts无法识别的类型转换成自己所需要的. 比如输入:广东-东莞-虎门,对应的输出时能输出:广东省 东莞市 虎门(镇/区) 这里涉及到的知识点即是将String转换为任 ...

  5. 树莓派进阶之路 (021) - 3.2inch RPi LCD (B)

    参考文档:http://www.waveshare.net/wiki/3.2inch_RPi_LCD_(B) 产品特点 320x240分辨率 电阻式触摸控制 兼容并可直接插入任何版本树莓派 提供Ras ...

  6. Docker(二):Dockerfile使用介绍

    上一篇文章Docker(一):Docker入门教程介绍了 Docker 基本概念,其中镜像.容器和 Dockerfile .我们使用 Dockerfile 定义镜像,依赖镜像来运行容器,因此 Dock ...

  7. SourceTree 代码库管理工具

    1.SourceTree 简介 SourceTree 是拥有可视化界面的项目版本控制软件,适用于 git 项目管理,window.mac 均可用. 官网下载地址 SourceTree 其它下载地址 S ...

  8. MySQL -- 全文检索(布尔全文检索)

    modifier的值为in boolean mode的时候,可以使用布尔全文检索.在布尔全文检索中,有些字符在检索字符串的开头或结尾会有特殊含义.在下面的示例中,+和-操作符表明在匹配的时候,单词必须 ...

  9. Ilist<object>转换成I<实体> 如何转换

    ml = objects.Cast<menu>().ToList(); //需要 using System.Linq;

  10. 图床神器:七牛云 + Mpic + FScapture

    概述 最近在搞Markdown的东西,遇到了一个很棘手的问题,即图片的显示:通用的图片,可以直接网上搜索,但有时候需要自己截一些图或者对下载的图片进行修改,在本地存储完全没有问题,但Markdown写 ...