close

Azure VM

All related post for Microsoft Azure VM

Azure VM

How to reset the Azure VM local password

no thumb

Estimated Reading Time: 1 minute

Sometimes if you are not using a Azure VM there is a quite possibility that you will forget the password of the VM, there is a way to reset the password for the Azure ARM based VM’s. You can reset the password from the Azure Portal as you can see below. Go to the reset password option and reset the password.

In the next screen it will update the password.

And it will reset your password. As you can see below.

read more
Azure VM

Confused with charges on your Azure VM – Let’s see how it’s calculated

no thumb

Estimated Reading Time: 1 minute

Recently I have been asked by few people about the Azure VM charges. Let’s see how Azure Bill for the VM.

Please note that when a new VM spin-up Azure starts charging for the following meters.

  • Compute hours
  • IP Address hours (if the Public IP is static)
  • Data Transfer Out (it’s about the data get out of the datacenter)
  • Standard IO-Block Blob Read, Write, Delete
  • Standard Managed Disk Operations

For any VM which is already build in the portal please note the following thumb rule.

  • When the VM is up & Running azure charge for all the above.
  • When the VM is Deallocated then charge only for storage (used capacity, e.g. if you got a 1TB disk and is in use 1GB you charge for 1GB, note this is not applicable for the managed disks, if you have a managed disk of 1 TB and the VM is deallocated Azure will still charge for the 1 TB managed disk.)
  • When the VM is shut down and not Deallocated then you charged both for storage and compute resources.

Where to check the billing information.

Azure Portal you can check resources cost from the Cost Management + Billing service.

read more
Azure VM

Top 12 ways to optimize the cost in Azure, with detail explanation on Azure Reserved VM Instances

no thumb
Estimated Reading Time: 6 minutes As an Azure Pre Sales or Delivery Architect, there must be lots of pressure on you to find various ways to save/reduce the cost/spend in the cloud. Your KPI and KRA may be also integrated with the cost savings which you can show at the end of the year. How to save the operational cost in Azure, this question is going to be one of the main headache of the CIO organisation going forward, since for the last couple of years we have seen many organizations has moved a significant number of their on-premises workload to Azure/AWS without much planning on the cost saving part. It may be because of the well-known joke in the Azure world where someone had asked the CIO why you are moving to the public cloud and CIO answered, since everyone is moving so we are. Since the original estimates were failing and spend on the azure budget is overshooting month by month, most of the public cloud architect jobs will need this important skill, as a top demanding skill in their role. With the introduction of Azure Advisor and Cost Management, you can get some insight definitely, but there are many things you should plan well in advance before your next deal which can provide a significant lead against your competitors. There are many cost savings measures which you can take and the top 12 initiative I have listed below. And all of them can be planned well in advance during the planning stage of the deal. Once you win the deal and project is in the delivery stage there will be ongoing initiatives to bring the down the Azure spend as well.
  1. RI’s (Reserved Instances), Pre-pay, on demand, Dedicated Hosts, BYOL etc.
  2. Usage duration of the Azure Resources. (For Example, if you pause the azure analysis services, you will not be billed)
  3. Selecting the right storage and using the Storage Pool and Stripped Volumes (IOPS calculation plays a big role here, also selection of storage policy like when data will move to cold and archive storage is important)
  4. Right Instance types (B Series VM’s etc.)
  5. Estimation of data volumes for the client proposal (Network capacity planning, ExpressRoute or Site to Site VPN etc.)
  6. Turn on / Off (Deallocating the VM when not in use.)
  7. Resize instances/change instance types.
  8. Scale Up/ Scale Down
  9. Conversion to PaaS services.
  10. Public cloud Waste management. (By right tagging the resources with the department which introduces responsibilities against over spending. )
  11. Low priority VM’s (Already I have explained this in detail in my older blog post.)
  12. HA planning with a single instance with limited allowed downtime.
There are other areas also where you can plan very well in advance and they are related to BCP and DR and the areas related to backup and recovery. In some of my upcoming blog post, I will discuss more on the Azure. Based on my experience I have seen one of the major cost reduction can be achieved if we can implement Azure Reserved instances for the Production and QA workloads. Today I am going to discuss in details about that, in my later blogs I will write more on other cost-saving measures. What is Azure Reservations (Reserved Instance)? ( One of the best option to reduce cost) Azure reservation is a way to pre-purchase your virtual machines (Compute Usage) for a duration 1 to 3 years. If you are using a VM 24 x7 and up to 365 days you can save up to 60-70-80% of the cost of Azure. It’s like a huge amount of savings and how you can achieve this or why MS is giving this discount? There are really two things why you will get this discount.
  1. You are committing for a longer period of time.
  2. Capacity planning will become easier for MS because they know that this many numbers of VM’s will be available for a longer commitment.
In this case, you need to pay upfront and Azure will stop charging an on-demand basis for the instances. How does it work? You need to buy the reservations for a region and for a particular VM size. When you prepay for that matching that VM size in a particular region it will apply to that. Please note that in this case if you switch off the VM, still you need to pay for it. Unlike to the low priority VM’s about which I have already written a detailed post here (They are for compute workload that are bursty), these VM instances should be considered for your 24 x 7 production or QA workloads which you don’t plan to shut down any time other than patching window or any other major upgrade. How to find the right candidates for the reserved instances? Once you migrate your QA and Production workload to Azure you start looking at your usage and see what VM’s and which regions you are using it consistently and determine the right candidate for the reserved instances. What will happen if you need to change the instance during the tenure? Now there may be a question on your mind that what will happen if you buy reserved instances for 3 years and after 18 months you want to change the size of the VM. In this case, you can exchange the reservations. There is unlimited exchange possible during a tenure. But there is a catch, the new value of reservation should be greater than currently what you are paying. So basically there is only upgrade exchange possible but not downgrade. What will happen if you want to terminate the lease in advance? That means if you wanted to terminate the contract before the end of the tenure. In case you wanted to cancel it early, there is a 12% early termination fees which will be deducted. And there is a limit of up to USD 50K in a year. That means you can cancel only up to USD 50K in a year. What will happen to the VM after the committed term? Suppose you have opted for three years term and after that, you have not renewed your VM reserved instances after 3 years Azure will again start charging you on pay as you go model. In other words, It will go to regular billing. Where can I find the reserved instances in the Azure Portal? You can go to the All Services in the Azure portal and click on Reservations. As you can see I have already created a reservation To Create new VM instances you can click on Add and you can see the below screen. Please note that if you select the scope as shared it will be applicable to all your subscription but if you select a particular subscription it will apply to only that subscription. I have also noticed another thing that based on my usage azure also recommend the VM size but it’s up to me about which VM I’ll choose. The cost will vary instance to instance if you choose a larger instance the cost savings will be 70% as you can see below. As you can see above the operating system will not be discounted by reservations it will only be applied to the compute usage. Your OS cost will be charged separately. But if you have a software assurance agreement and you are an enterprise customer and you have already paid for the licenses. In this case, you can combine the reservations and Azure hub (The license will be stored in Azure HUB for more details you can read here) benefits. What is Azure HUB? Hybrid Use Benefit (HUB) is available to customers with Enterprise Agreements and Software Assurance that enables Windows Server licenses on-premises to be leveraged in Azure which results in Windows VMs costing the same as Linux VMs (since there is no charge for the Windows Server license). With the combination with HUB you can save up to 80% of the total running cost. To know about the Azure Reserved Instances cost kindly check the Azure Pricing calculator here. That’s all for today. I hope you have a good time reading this blog and you have learned a good thing. You have a very good rest of your day. In the next few of my blog post, I will discuss how we can optimize the cost in Azure and other various ways to do so. Stay tuned for more.
read more
Azure VM

Azure resource health should be the first place to check any issues with Azure Services

no thumb

Estimated Reading Time: 2 minutes

It’s always recommended to check Azure Resource Health before doing any further troubleshooting. I am giving you two interesting examples which we have seen in the past.

Recently few DBA’s has complained about the slow running of the SQL queries in some of our large ERP databases for some of the day in a week. During the investigation, they have revealed that the database tables which have rows more than one million are taking almost 350 secs for a particular period of the day although usually, it takes no longer than 10 secs.

It may be related to the planning of maintenance activities. Always check your Resource Health for any unavailable resources during the said period of time. To check the resource health go to the SQL database and navigate to the Resource health tab

Another example is a VM is suddenly got disconnected and not available to the users.

The ping request is also failing.

The VM came back after some time, however, the team has wasted some valuable time thinking it’s a network issue. And had engaged the network team for the troubleshooting.

After two days when we have checked the Azure resource, we have seen the below health issues on that particular day.

So from next time you see some issues related to your Azure resources go to Settings->Support-Troubleshooting and check the azure resource health. The troubleshooting section will give you a guided step by step experience to diagnose the issue and medicate the issue.

Even in the recommended steps of troubleshooting also it’s always mentioned that check the resource health as the first place of troubleshooting.

I hope this small piece of information might help you. I will try to bring more on Azure platform related troubleshooting steps in my future posts, thanks for your valuable time and stay tuned for further.

read more
Azure VM

Azure SQL Server Managed Instances – It’s going to change the SQL Server world.

no thumb

SQL Server Managed instances are going to be the next big thing in the SQL server world. Currently, it’s in preview and promises a lot to offer. After this offering will come into GA, I hope we can witness many migrations from SQL server VM to SQL Server Managed Instances.

Now if you are new about the Azure SQL Databases, let’s see what are the three offers we have currently on Azure for the SQL Server Databases.

Single DatabaseElastic PoolManaged Instances(Preview)
Standalone managed database for predictable and scalable workloadShared resource model for greater efficiency through multi-tenancy.Instance scope programming model with high compatibility to SQL Server
Best for apps that required resource guarantee at the database level.Best for SaaS apps with multiple databases that can share resources at the database level, achieving better cost efficiency.Best for modernization with scale with low cost and effort.

What is SQL Server Managed Instances?

It’s a new deployment model of Azure SQL Database, providing near 100% compatibility with the latest SQL Server on-premises (Enterprise Edition) Database Engine.
You may ask the question why it’s near, you can find what are the things which are missing in the managed instance, once you go through rest of the section in this blog.

Features of the SQL Server Managed Instances.

  • Fully Managed Data Base as a Service (DBaaS)
  • Built on the same infrastructure of the SQL DB
  • Fully-fledged SQL instance with nearly 100% compatible with on-prem.
  • Full isolation and security. ( Container within your Vnet, Private IP addresses, EXPRESSROUTE/VPN Connectivity)
  • New Business Model (Transparent, Frictionless, Competitive)

It will not be very critical to understand which business will run on which SQL Server offering in Azure if you own SQL server VM’s, ultimately you own patching, backups and database high availability, which is definitely not required if you move to SQL server managed instances, and there are more.

Let’s see a detail comparison table.

SQL Server on VMSQL Server Managed Instance
Hardware Purchasing and ManagementBuilt-in Scale-on-Demand
Protect Data with Backups (with health check and retention) manual configuration requiredBuilt-in Point-In-Time-Restore
High Availability Implementation RequiredBuilt-in 99.99% SLA and Auto Fail-Over
Disaster Recovery Implementation RequiredBuilt-in Geo-Redundancy and Geo-Replication
Ensure Compliance and Standards on your ownBuilt-In compliance (Easy to use features)
Secure your data from malicious attacks and mistakesBuilt-In easy to manage feature
Patching (Updates Roll Out)Updates and Upgrades will be done by MS
Monitor, troubleshoot and manage at a scaleBuilt-In Easy to use feature
Security IsolationIsolated environment (V-Net Integration)
Tune and Maintain for predictable performanceBuilt-In Easy to use feature

Let’s have a detail understanding of all the available features, supportability, migration, security and other details.

What are the familiar SQL server features which can be found?

  • Native Backup and Restore
  • Cross-database queries and transactions
  • Security Features including Transparent Data Encryption, SQL Audit, Always Encrypted and Dynamic Data Masking
  • SQL Agent, DBMail
  • Scenario Enablers: Change Data Capture, Service Broker, Transactional Replication and CLR
  • DMVs, XEvents, and Query Store for Troubleshooting

What is the Version Compatibility?

  • Full Compatibility with SQL Server 2005+

What is the available Authentication Process?

  • SQL Server
  • Active Directory

What is the Authorization level?

  • SQL Server 2017

How to carry the Pre Migration Assessment Process?

  • Pre Migration Assessment Process can be done by running the Database Migration Assistant (DMA) and Database Experimentation Assessment (DEA)

What is the Migration Process?

  • DMS (Data migrations at scale)
  • Native Backup and Restore
  • Log Reply
    (Coming in GA)

What are the Security Features?

  • SQL Audit
  • Encryption (TDE, AE)
  • Vulnerability Assessment (Coming in GA)
  • Row Level Security
  • Dynamic Data Masking

What are Programmability Features added?

  • Cross-Database Queries and Transactions
  • .NET
  • R Language(Coming in GA)
  • Linked Server
  • Global Temp Tables

Scenario Enables

  • Service Broker
  • Change Data Capture
  • Transactional Replication

What are the features which have the better alternative in Azure?

  • Always ON Availability Groups ->Local HA, Active Geo-Replication
  • Windows Authentication->Azure AD Authentication
  • Management Data Warehouse->OMS Integration

What are the retired features?

  • Database Mirroring
  • Extended Stored Procedures: Customers should use CLR

What are the features which will be included post GA?

  • Filestream, Filetable
  • Cross-Instance Distributed Transaction (MS – DTC)
  • Stretch Database
  • Polybase

How your data will be secure and isolated?

  • Full isolation from other tenants without resource sharing
  • Promote secure communication over private IP addresses with native VNET integration
  • Enable your on-premises identities on cloud instances integration with Azure AD and AD Connect

What is the Azure Backup Retention Period?

  • By default 7 days

Types of SQL Server Managed Instances in Azure

  1. General Purpose
  2. Business Critical

Let’s see what are the difference between the above two instances.

 General PurposeBusiness Critical
Best ForData Applications with Common I/O and Availability RequirementsBusiness Critical Data Applications with fast I/O and High Availability Requirements
Compute Tiers8, 16,24,32,40,64, 80 vCores8, 16,24,32,40,64, 80 vCores
StorageFast Remote Storage 32 GB – 8TB Per instanceSuper-Fast Local SSD storage 32 GB-4TB Per Instance
Availability1 replica, no read scale (Two node availability group, the secondary is not readable)3 replica, 1 read scale (Three node availability group, 1 secondary is readable)
Surface AreaFull (except in-memory OLTP)Full

Azure Hybrid Benefits

Please see the Azure Hybrid Benefits if you bring the on-prem license in Azure

1 SQL Server Standard License Core = 1 General Purpose Core
1 SQL Server Enterprise License Core = 1 Business Critical Core
1 SQL Server Enterprise License Core = 4 General Purpose Cores

Conclusion: Azure Managed instance is going to change the world of SQL server instance management, it has all the business features in-built and doesn’t need in-person database management, the SQL DBA’s must be thinking that their job is at risk, I personally feel they can start learning new areas in database technologies like ML, AI, Neural Networks etc. which looks very promising. That’s all for today. Thanks for your time for reading this post. You have a great day ahead.

read more
Azure VM

Monitor and update a Windows virtual machine in Azure

no thumb

In this article

  1. Create virtual machine
  2. View boot diagnostics
  3. View host metrics
  4. Install diagnostics extension
  5. View VM metrics
  6. Create alerts
  7. Manage Windows updates
  8. Monitor changes and inventory
  9. Advanced monitoring
  10. Next steps

Azure monitoring uses agents to collect boot and performance data from Azure VMs, store this data in Azure storage, and make it accessible through portal, the Azure PowerShell module, and the Azure CLI. Update management allows you to manage updates and patches for your Azure Windows VMs.

In this tutorial, you learn how to:

  • Enable boot diagnostics on a VM
  • View boot diagnostics
  • View VM host metrics
  • Install the diagnostics extension
  • View VM metrics
  • Create an alert
  • Manage Windows updates
  • Monitor changes and inventory
  • Set up advanced monitoring

This tutorial requires the Azure PowerShell module version 5.7.0 or later. Run Get-Module -ListAvailable AzureRM to find the version. If you need to upgrade, see Install Azure PowerShell module.

Create virtual machine

To configure Azure monitoring and update management in this tutorial, you need a Windows VM in Azure. First, set an administrator username and password for the VM with Get-Credential:

Lunch Azure PowerShell and type  below command.

$cred = Get-Credential

 Now create the VM with New-AzureRmVM. The following example creates a VM named myVMin the EastUS location. If they do not already exist, the resource group myResourceGroupMonitorMonitor and supporting network resources are created:

Lunch Azure PowerShell and type  below command.

 
New-AzureRmVm ` 
-ResourceGroupName”myResourceGroupMonitor”
-Name”myVM” 
-Location “East US” `
-Credential $cred
 
It takes a few minutes for the resources and VM to be created.

 

View boot diagnostics
As Windows virtual machines boot up, the boot diagnostic agent captures screen output that can be used for troubleshooting purpose. This capability is enabled by default. The captured screen shots are stored in an Azure storage account, which is also created by default.

You can get the boot diagnostic data with the Get-AzureRmVMBootDiagnosticsData command. In the following example, boot diagnostics are downloaded to the root of the *c:* drive.

Lunch Azure PowerShell and type  below command.

Get-AzureRmVMBootDiagnosticsData -ResourceGroupName “myResourceGroupMonitor” -Name “myVM” -Windows -LocalPath “c:\”

View host metrics

A Windows VM has a dedicated Host VM in Azure that it interacts with. Metrics are automatically collected for the Host and can be viewed in the Azure portal.

  1. In the Azure portal, click Resource Groups, select myResourceGroupMonitor, and then select myVM in the resource list.
  2. Click Metrics on the VM blade, and then select any of the Host metrics under Available metrics to see how the Host VM is performing.

View host metrics
 

Install diagnostics extension

The basic host metrics are available, but to see more granular and VM-specific metrics, you to need to install the Azure diagnostics extension on the VM. The Azure diagnostics extension allows additional monitoring and diagnostics data to be retrieved from the VM. You can view these performance metrics and create alerts based on how the VM performs. The diagnostic extension is installed through the Azure portal as follows:

  1. In the Azure portal, click Resource Groups, select myResourceGroupMonitor, and then select myVM in the resource list.
  2. Click Diagnosis settings. The list shows that Boot diagnostics are already enabled from the previous section. Click the check box for Basic metrics.
  3. Click the Enable guest-level monitoring button.

View diagnostic metrics

View VM metrics

You can view the VM metrics in the same way that you viewed the host VM metrics:

  1. In the Azure portal, click Resource Groups, select myResourceGroupMonitor, and then select myVM in the resource list.
  2. To see how the VM is performing, click Metrics on the VM blade, and then select any of the diagnostics metrics under Available metrics.

View VM metrics

Create alerts

You can create alerts based on specific performance metrics. Alerts can be used to notify you when average CPU usage exceeds a certain threshold or available free disk space drops below a certain amount, for example. Alerts are displayed in the Azure portal or can be sent via email. You can also trigger Azure Automation runbooks or Azure Logic Apps in response to alerts being generated.

The following example creates an alert for average CPU usage.

  1. In the Azure portal, click Resource Groups, select myResourceGroupMonitor, and then select myVM in the resource list.
  2. Click Alert rules on the VM blade, then click Add metric alert across the top of the alerts blade.
  3. Provide a Name for your alert, such as myAlertRule
  4. To trigger an alert when CPU percentage exceeds 1.0 for five minutes, leave all the other defaults selected.
  5. Optionally, check the box for Email owners, contributors, and readers to send email notification. The default action is to present a notification in the portal.
  6. Click the OK button.

Manage Windows updates

Update management allows you to manage updates and patches for your Azure Windows VMs. Directly from your VM, you can quickly assess the status of available updates, schedule installation of required updates, and review deployment results to verify updates were applied successfully to the VM.

For pricing information, see Automation pricing for Update management

Enable Update management

Enable Update management for your VM:

  1. On the left-hand side of the screen, select Virtual machines.
  2. From the list, select a VM.
  3. On the VM screen, in the Operations section, click Update management. The Enable Update Management screen opens.

Validation is performed to determine if Update management is enabled for this VM. The validation includes checks for a Log Analytics workspace and linked Automation account, and if the solution is in the workspace.

Log Analytics workspace is used to collect data that is generated by features and services such as Update management. The workspace provides a single location to review and analyze data from multiple sources. To perform additional actions on VMs that require updates, Azure Automation allows you to run runbooks against VMs, such as download and apply updates.

The validation process also checks to see if the VM is provisioned with the Microsoft Monitoring Agent (MMA) and Automation hybrid runbook worker. This agent is used to communicate with the VM and obtain information about the update status.

Choose the Log analytics workspace and automation account and click Enable to enable the solution. The solution takes up to 15 minutes to enable.

If any of the following prerequisites were found to be missing during onboarding, they’re automatically added:

The Update Management screen opens. Configure the location, Log analytics workspace and Automation account to use and click Enable. If the fields are grayed out, that means another automation solution is enabled for the VM and the same workspace and Automation account must be used.

Enable Update management solution

 

Enabling the solution can take up to 15 minutes. During this time, you shouldn’t close the browser window. After the solution is enabled, information about missing updates on the VM flows to Log Analytics. It can take between 30 minutes and 6 hours for the data to be available for analysis.

View update assessment

After Update management is enabled, the Update management screen appears. After the evaluation of updates is complete, you see a list of missing updates on the Missing updatestab.

View update status

 

Schedule an update deployment

To install updates, schedule a deployment that follows your release schedule and service window. You can choose which update types to include in the deployment. For example, you can include critical or security updates and exclude update rollups.

Schedule a new Update Deployment for the VM by clicking Schedule update deployment at the top of the Update management screen. In the New update deployment screen, specify the following information:

  • Name – Provide a unique name to identify the update deployment.
  • Update classification – Select the types of software the update deployment included in the deployment. The classification types are:

    • Critical updates
    • Security updates
    • Update rollups
    • Feature packs
    • Service packs
    • Definition updates
    • Tools
    • Updates
  • Schedule settings – You can either accept the default date and time, which is 30 minutes after current time, or specify a different time. You can also specify whether the deployment occurs once or set up a recurring schedule. Click the Recurring option under Recurrence to set up a recurring schedule.

Update Schedule Settings screen

  • Maintenance window (minutes) – Specify the period of time you want the update deployment to occur within. This helps ensure changes are performed within your defined service windows.

After you have completed configuring the schedule, click Create button and you return to the status dashboard. Notice that the Scheduled table shows the deployment schedule you created.

 Warning

For updates that require a reboot, the VM is restarted automatically.

View results of an update deployment

After the scheduled deployment starts, you can see the status for that deployment on the Update deployments tab on the Update management screen. If it is currently running, it’s status shows as In progress. After it completes, if successful, it changes to Succeeded. If there is a failure with one or more updates in the deployment, the status is Partially failed. Click the completed update deployment to see the dashboard for that update deployment.

Update Deployment status dashboard for specific deployment

 

In Update results tile is a summary of the total number of updates and deployment results on the VM. In the table to the right is a detailed breakdown of each update and the installation results, which could be one of the following values:

  • Not attempted – the update was not installed because there was insufficient time available based on the maintenance window duration defined.
  • Succeeded – the update succeeded
  • Failed – the update failed

Click All logs to see all log entries that the deployment created.

Click the Output tile to see job stream of the runbook responsible for managing the update deployment on the target VM.

Click Errors to see detailed information about any errors from the deployment.

Monitor changes and inventory

You can collect and view inventory for software, files, Linux daemons, Windows Services, and Windows Registry keys on your computers. Tracking the configurations of your machines can help you pinpoint operational issues across your environment and better understand the state of your machines.

Enable Change and Inventory management

Enable Change and Inventory management for your VM:

  1. On the left-hand side of the screen, select Virtual machines.
  2. From the list, select a VM.
  3. On the VM screen, in the Operations section, click Inventory or Change tracking. The Enable Change Tracking and Inventory screen opens.

Configure the location, Log analytics workspace and Automation account to use and click Enable. If the fields are grayed out, that means another automation solution is enabled for the VM and the same workspace and Automation account must be used. Eventhough the solutions are separate on the menu, they are the same solution. Enabling one enables both for your VM.

Enable Change and Inventory tracking

After the solution has been enabled it may take some time while inventory is being collected on the VM before data appears.

Track changes

On your VM select Change Tracking under OPERATIONS. Click Edit Settings, the Change Tracking page is displayed. Select the type of setting you want to track and then click + Add to configure the settings. The available options for Windows are:

  • Windows Registry
  • Windows Files

For detailed information on Change Tracking see, Troubleshoot changes on a VM

View inventory

On your VM select Inventory under OPERATIONS. On the Software tab, there is a table list the software that had been found. The high-level details for each software record are viewable in the table. These details include the software name, version, publisher, last refreshed time.

View inventory

Monitor Activity logs and changes

From the Change tracking page on your VM, select Manage Activity Log Connection. This task opens the Azure Activity log page. Select Connect to connect Change tracking to the Azure activity log for your VM.

With this setting enabled, navigate to the Overview page for your VM and select Stop to stop your VM. When prompted, select Yes to stop the VM. When it is deallocated, select Start to restart your VM.

Stopping and starting a VM logs an event in its activity log. Navigate back to the Change tracking page. Select the Events tab at the bottom of the page. After a while, the events shown in the chart and the table. Each event can be selected to view detailed information on the event.

View changes in the activity log

The chart shows changes that have occurred over time. After you have added an Activity Log connection, the line graph at the top displays Azure Activity Log events. Each row of bar graphs represents a different trackable Change type. These types are Linux daemons, files, Windows Registry keys, software, and Windows services. The change tab shows the details for the changes shown in the visualization in descending order of time that the change occurred (most recent first).

Advanced monitoring

You can do more advanced monitoring of your VM by using the solutions like Update Management and Change and Inventory provided by Azure Automation.

When you have access to the Log Analytics workspace, you can find the workspace key and workspace identifier on by selecting Advanced settings under SETTINGS. Use the Set-AzureRmVMExtension command to add the Microsoft Monitoring agent extension to the VM. Update the variable values in the below sample to reflect you Log Analytics workspace key and workspace Id.

Lunch Azure PowerShell and type  below command.

$workspaceId = “<Replace with your workspace Id>” 

$key = “<Replace with your primary key>” 

Set-AzureRmVMExtension -ResourceGroupName “myResourceGroupMonitor” `

-ExtensionName “Microsoft.EnterpriseCloud.Monitoring” `

  -VMName “myVM” ` 

-Publisher “Microsoft.EnterpriseCloud.Monitoring” `

 -ExtensionType “MicrosoftMonitoringAgent”

-TypeHandlerVersion 1.0 `

-Settings @{“workspaceId” = $workspaceId} `

-ProtectedSettings @{“workspaceKey” = $key} `

-Location “East US”

 

After a few minutes, you should see the new VM in the Log Anaytics workspace.

 OMS blade

 

In this tutorial, you configured and reviewed VMs with Azure Security Center. You learned how to:

  • Create a virtual network
  • Create a resource group and VM
  • Enable boot diagnostics on the VM
  • View boot diagnostics
  • View host metrics
  • Install the diagnostics extension
  • View VM metrics
  • Create an alert
  • Manage Windows updates
  • Monitor changes and inventory
  • Set up advanced monitoring

Advance to the next tutorial to learn about Azure security center.

 

read more
1 2 3
Page 3 of 3