• No results found

Modifying the default connection settings

You can specify that these endpoints should not be created when using the Azure PowerShell cmdlets by specifying the following parameters of Add-AzureProvisioningConfig.

-NoWinRMEndpoint will not create an endpoint for WinRM.

-NoSSHEndpoint will not create an endpoint for SSH.

-NoRDPEndpoint will not create an endpoint for RDP.

It is also possible to disable SSH and Windows PowerShell remoting altogether by specify-ing parameters on New-AzureQuickVM and Add-AzureProvisionspecify-ingConfig:

New-AzureQuickVM

-DisableWinRMHttps does not enable Windows PowerShell remoting

Add-AzureProvisioningConfig

-DisableSSH does not enable SSH

-DisableWinRMHttps does not enable Windows PowerShell remoting

Thought experiment

Deploying a Linux-based solution

In this thought experiment, apply what you have learned about this objective. You can find answers to these questions in the “Answers” section at the end of this chapter.

You are the IT administrator for Contoso. A new team has come online that needs to deploy a solution based on Apache. The solution has features that are not sup-ported directly on Windows.

This solution must support deploying two servers that will be used as web servers, and two servers that will be used as database servers. All of the servers must be reachable on the same network.

1. What features should be configured on the web servers to provide external con-nectivity and high availability?

2. Should all of the servers be deployed into the same domain name (or cloud ser-vice), or should they be deployed in their own?

Objective summary

There are several methods of creating Azure virtual machines. The management portal is cross-platform and is supported by most modern browsers. To create virtual machines from the command line, the Azure cross-platform command-line tools are available on Windows, Mac, and Linux. The Azure PowerShell cmdlets are available for Windows PowerShell users.

One or more virtual machines (up to 50) can be created in a cloud service. Creating virtual machines in the same cloud service is required to configure the virtual machines to be in the same load balanced set or availability set. Virtual machines in the same cloud service can connect to other virtual machines in the same cloud service by using their internal IP.

Using the Azure PowerShell cmdlets, you must select the subscription prior to use with the Select-AzureSubscription cmdlet. To specify the default storage account to use for virtual machine disks, set the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet.

There are several operating system specific settings when creating a virtual machine from a Windows or Linux-based image. Not all of these settings are accessible from the management portal. Many can only be set with Windows PowerShell using the New-AzureQuickVM, New-AzureVM, or Add-AzureProvisioningConfig cmdlets.

The Azure PowerShell cmdlets can manage the lifecycle of your virtual machines with cmdlets such as Start-AzureVM, Restart-AzureVM, Stop-AzureVM, and Remove-AzureVM.

You can delete all of the virtual machines in a cloud service with one operation by using the Remove-AzureService cmdlet.

By default, virtual machines will have connectivity enabled for Remote Desktop and PowerShell remoting on virtual machines created from a Windows-based image. For virtual machines created from a Linux-based image, SSH will be enabled by default.

Objective review

Answer the following questions to test your knowledge of the information in this objective.

You can find the answers to these questions and explanations of why each answer choice is correct or incorrect in the “Answers” section at the end of this chapter.

1. To avoid losing the public virtual IP of a cloud service, what is the correct way to shut down the last virtual machine in the cloud service?

A. Stop-AzureVM -ServiceName $serviceName -Name $vmName.

B. Use the management portal to shut down the virtual machine.

C. Stop-AzureVM -ServiceName $serviceName -Name $vmName -StayProvisioned or shutting down the virtual machine from within the guest operating system.

D. Use a reserved IP address.

2. How many virtual machines can be deployed into a cloud service?

A. Unlimited B. 25 C. 50 D. 1

3. How many virtual machines can be in the same availability set?

A. Unlimited B. 25 C. 50 D. 1

4. Which cmdlet must be run first to deploy a Linux-based virtual machine into a new cloud service and deploy an SSH certificate using the Azure PowerShell cmdlets?

A. New-AzureService B. New-AzureVM C. New-AzureVMConfig D. Set-AzureService

Objective 2.2: Implement images and disks

Azure virtual machines support multiple image types (generic and specialized) that can be used for provisioning virtual machines in several scenarios for quick deployments, and even a simple backup. Other common tasks that are related to images and disks include the ability to upload and download virtual hard disk files and copy them between storage accounts and subscriptions. The virtual hard disk files must be registered as operating system disks or data disks to be directly usable by an Azure virtual machine as a mountable disk.

This objective covers how to:

Upload and download virtual hard disk files (.vhd)

Copy virtual hard disks between storage accounts and subscriptions

Implement specialized and generic virtual machine images

Manage virtual hard disk (VHD) files and disks