Windows Azure Infrastructure Services new functionality VM Agent

Source: Internet
Author: User
Keywords Azure azure agent infrastructure services

Windows http://www.aliyun.com/zixun/aggregation/13357.html ">azure infrastructure services recently announced a new feature VM Agent. The VM Agent is a lightweight process for launching additional solutions, shared by Microsoft or partners, to configure, manage, and accelerate virtual machines. This blog is intended to illustrate the relationship between the VM Agent and its VM extender, as well as their benefits and usage. The 1th part of this blog focuses on how to enable VM agents and extenders on new Azure VMS, and part 2nd focuses on extending this functionality to existing VMS.

What is a VM extender?

Before we discuss VM extenders, let's take a look at how the extra software is now implemented on an IaaS virtual machine. Some of the common methods for installing and managing software on VMS include 1, pre-install the software to disk 2 before creating the VM, and then manually install software 3 in the VM, using a variety of tools for update management and health/status reporting through remote PowerShell installation 4.

Here's how VM Extenders can simplify VM management.

VM Extender is a software component that extends VM functionality and simplifies multiple VM management operations.
Multiple VM extensions can be installed on any given VM, and these VM extenders can be added, updated, and removed independently of the VM's lifecycle.
The state of the VM and its extender can be viewed and managed in the same location.
The following is a view of the VM with an extender:

Who writes these extenders?

These extenders are created by the Microsoft
The registered publisher writes, publishes, and provides support. Each extender has publisher information. This blog focuses on how to add extenders to the VM, and in future blogs we will discuss the Extender publishing process.

What extensions are available now?

There are now two IaaS VM extenders released by Microsoft that can be –bginfo and vmaccess.

Bginfo:bginfo is an extender that can write useful server information as wallpaper to the desktop. In the future, if your VM was created from the portal, you already have this extender.

When Bginfo is enabled, the wallpaper of the VM desktop will look like this:

If you want to add this feature manually, you can use the cmdlet set-azurevmbginfoextenion for convenience. See the MSDN documentation here for details on the use of this cmdlet.

Enable Bgino:
Get-azurevm–servicename–name |
Set-azurevmbginfoextensiom | Update-azurevm

Disable BGInfo:
View the referencename and Version of the Extender from the output from the following cmdlet:

Get-azurevm–servicename–name |
Get-azurevmbginfoextension

Get-azurevm–servicename–name |
set-azurevmbginfoextension–referencename–version–disable | Update-azurevm

Sometimes disabling Bginfo requires logging off and then logging on.

Note: If you are already a Bginfo user, you may want to note that the Bginfo extender version does not yet support modifying Bginfo settings on the VM.

Vmaccess: If you have previously lost your IaaS VM password, you should be aware that the password will not be restored. Similarly, if the RDP settings on the VM are corrupted, it is not easy to fix the settings. Vmaccess can solve the problems in both scenarios. For passwords, Vmaccess provides a mechanism for users to log on to the VM again by resetting their passwords and user names. When you can log in with a reset password, it is recommended that you change your password.

See the MSDN documentation here for details on the use of this cmdlet.

Here are some usage scenarios for vmaccess.

Reset Password:
Get-azurevm–servicename–name |
Set-azurevmaccessextension–username–password | Update-azurevm

If you want to change the user name, specify a new value for "UserName", or use an existing value if you do not want to change it.

To repair the RDP settings:
Get-azurevm–servicename–name |
set-azurevmaccessextension | Update-azurevm

Calling set-azurevmaccessextension without using any parameters can fix any corrupted RDP settings. After you enable the Extender, you can call the cmdlet again or restart the VM if you want to fix the RDP settings in the future.

Disable vmaccess:
View the referencename and Version of the Extender from the output from the following cmdlet:

Get-azurevm–servicename–name |
Get-azurevmaccessextension

Get-azurevm–servicename–name |
set-azurevmaccessextension–referencename–version–disable | Update-azurevm

Log off and log on to the VM to disable vmacces.

What are the prerequisites for enabling a VM extender?

Enabling VM Extenders has only one simple prerequisite-enabling the VM Agent when creating an IaaS VM. When you create a VM through the portal or the latest Azure Powershell, Vmagent is enabled by default unless it is manually disabled.

Note: The 2nd part of this blog will show you how to enable VM agents on existing VMS and on VMS created on disk.

What is the future development of the VM extender?

Hopefully, so far, this blog has taken you through a broad understanding of how to use the VM Extender to turn on and off additional features on the VM. Bginfo and Vmaccess
Is the first available extender, and we hope to have more extensions in the next few months. Please be aware that you are welcome to read this blog again and learn more about the new VM extensions.

What about the Cloud service extender?

While this blog focuses on virtual machines, I want to add that the Extender also works for the cloud service VM, and there are now a number of cloud service extensions available, such as RDP and WAD extenders. In future blogs, we'll discuss these cloud services extensions and other new cloud service extensions.

VM agents and Extenders-part 2nd

Hopefully, the previous blog, "VM Agent and Extender-part 1th", gives you an idea of the VM agent and its benefits and how to create a new VM with the VM agent enabled. In the 2nd part of this blog series, we'll discuss two key scenarios-enabling VM agents on existing VMS and on VMS created on disk.

1 Enable VM Agent on an existing VM:

If you have created an Azure VM before the VM agent is available, this workflow will show you how to enable the VM agent on such a VM, and then enable the Extender on that VM.

1.1 Verify that VM Agent is not enabled on the VM:

The operation can be accomplished using the following Azure PowerShell cmdlet:

$x = Get-azurevm-servicename $serviceName

Verify the $x. VM. Provisionguestagent "to false.

If $x. VM. Provisionguestagent is true to indicate that the VM already has a VM Agent. The remaining steps can be skipped.

1.2 Install the Microsoft Azure VM Agent and prepare the VM:

The Azure VM Agent installer is a stand-alone MSI for installing VM agents on VMS. Installing the VM Agent takes a simple step: Download the MSI and start the MSI. Install the VM Agent based on the installer workflow shown below.

1.1 The PowerShell setting flag indicates that the VM Agent is installed:

Now that the VM agent is installed in the VM, the next step is to notify the Azure platform that the VM has been installed with the VM agent. The operation can be accomplished by running the following Azure PowerShell cmdlet:

$VM = Get-azurevm–servicename $svc –name $name

$VM. VM. Provisionguestagent = $TRUE

Update-azurevm–name $name-VM $VM. Vm-servicename $svc

Note: The Azure PowerShell cmdlet can be downloaded here.

This VM can now run any VM extenders at any time!

2 How to enable VM agents and extenders on disk-created VMS:

Another common VM creation scenario is the creation of an Azure VM via disk. If you want to use the image prepared by Sysprep in the Azure portal, the VM Agent is enabled in the VM creation workflow, without performing any additional steps. However, if you are using a dedicated disk, the VM Agent needs to be installed manually. The following steps describe the processes involved.

2.1 Install the VM Agent on the VHD:

Use the disk to create the VM locally, and then install the VM Agent using MSI.

Upload the VHD to Azure.

2.2 Creating a VM from disk

In the portal, create the VM from the library and select the uploaded VHD. In the VM creation workflow, select the flag to indicate that the disk already contains the VM Agent. After that, the Extender can be added to the VM during or after the VM creation process.

3. What do I need to do to enable the VM Agent?

After the VM Agent is enabled on the VM, any available extenders, such as BGInfo, vmaccess, can be added to the VM. In the next few blogs, we'll discuss how to find more extenders and add them to the VM, such as running any custom scripts directly on the running VM.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.