Analyze server dependencies (agentless)
This article describes how to set up agentless dependency analysis using Azure Migrate: Discovery and assessment tool. Dependency analysis helps you to identify and understand dependencies across servers for assessment and migration to Azure.
Current limitations
- In the dependency analysis view, you currently can't add or remove a server from a group.
- A dependency map for a group of servers isn't currently available.
- In an Azure Migrate project, you can enable dependency data collection concurrently for 1,000 servers per appliance.
- You can analyze more than 1,000 servers per project either by enabling dependency analysis concurrently on servers discovered by multiple appliances or by sequencing in batches of 1000 for servers discovered from one appliance.
Before you start
Ensure that you created a project with the Azure Migrate: Discovery and assessment tool added to it.
Review the requirements based on your environment and the appliance you're setting up to perform software inventory:
Environment Requirements Servers running in VMware environment Review VMware requirements
Review appliance requirements
Review port access requirements
Review agentless dependency analysis requirementsServers running in Hyper-V environment Review Hyper-V host requirements
Review appliance requirements
Review port access requirements
Review agentless dependency analysis requirementsPhysical servers or servers running on other clouds Review server requirements
Review appliance requirements
Review port access requirements
Review agentless dependency analysis requirementsReview the Azure URLs that the appliance will need to access in the Azure operated by 21Vianet.
Deploy and configure the Azure Migrate appliance
- Deploy the Azure Migrate appliance to start discovery. To deploy the appliance, you can use the deployment method as per your environment. After deploying the appliance, you need to register it with the project and configure it to initiate the discovery.
- As you configure the appliance, you need to specify the following in the appliance configuration manager:
- The details of the source environment (vCenter Server(s)/Hyper-V host(s) or cluster(s)/physical servers) which you want to discover.
- Server credentials, which can be domain/ Windows (non-domain)/ Linux (non-domain) credentials. Learn more about how to provide credentials and how the appliance handles them.
- Verify the permissions required to perform agentless dependency analysis. For Windows servers, you need to provide domain or non-domain (local) account with administrative permissions. For Linux servers, provide a sudo user account with permissions to execute ls and netstat commands or create a user account that has the CAP_DAC_READ_SEARCH and CAP_SYS_PTRACE permissions on /bin/netstat and /bin/ls files. If you're providing a sudo user account, ensure that you enabled NOPASSWD for the account to run the required commands without prompting for a password every time sudo command is invoked.
Add credentials and initiate discovery
- Open the appliance configuration manager, complete the prerequisite checks and registration of the appliance.
- Navigate to the Managed credentials and discovery sources panel.
- In Step 1: Provide credentials for discovery source, select Add credentials to provide credentials for the discovery source that the appliance uses to discover servers running in your environment.
- In Step 2: Provide discovery source details, select Add discovery source to select the friendly name for credentials from the drop-down, specify the IP address/FQDN of the discovery source.
- In Step 3: Provide server credentials to perform software inventory and agentless dependency analysis, select Add credentials to provide multiple server credentials to perform software inventory.
- Select Start discovery, to initiate discovery.
After the server discovery is complete, appliance initiates the discovery of installed applications, roles, and features (software inventory) on the servers. During software inventory, the discovered servers are validated to check if they meet the prerequisites and can be enabled for agentless dependency analysis.
Note
You can enable agentless dependency analysis for discovered servers from Azure Migrate project. Only the servers where the validation succeeds can be selected to enable agentless dependency analysis.
After servers have been enabled for agentless dependency analysis from portal, appliance gathers the dependency data every 5 mins from the server and sends an aggregated data point every 6 hours to Azure. Review the data collected by appliance during agentless dependency analysis.
Start dependency discovery
Select the servers on which you want to enable dependency discovery.
In Azure Migrate: Discovery and assessment, select Discovered servers.
Choose the Appliance name whose discovery you want to review.
You can see the validation status of the servers under Dependencies (agentless) column.
Select the Dependency analysis drop-down.
Select Add servers.
In the Add servers page, select the servers where you want to enable dependency analysis. You can enable dependency mapping only on those servers where validation succeeded. The next validation cycle will run 24 hours after the last validation timestamp.
After selecting the servers, select Add servers.
You can visualize dependencies around six hours after enabling dependency analysis on servers. If you want to simultaneously enable multiple servers for dependency analysis, you can use PowerShell to do so.
Visualize dependencies
In Azure Migrate: Discovery and assessment, select Discovered servers.
Choose the Appliance name whose discovery you want to review.
Search for the server whose dependencies, you want to review.
Under the Dependencies (agentless) column, select View dependencies
Change the time period for which you want to view the map using the Time duration dropdown.
Expand the Client group to list the servers with a dependency on the selected server.
Expand the Port group to list the servers that have a dependency from the selected server.
To navigate to the map view of any of the dependent servers, select the server name > Load server map
Expand the selected server to view process-level details for each dependency.
Note
Process information for a dependency is not always available. If it's not available, the dependency is depicted with the process marked as "Unknown process".
Export dependency data
- In Azure Migrate: Discovery and assessment, select Discovered servers.
- Select the Dependency analysis drop-down.
- Select Export application dependencies.
- In the Export application dependencies page, choose the appliance name that is discovering the desired servers.
- Select the start time and end time. Note that you can download the data only for the last 30 days.
- Select Export dependency.
The dependency data is exported and downloaded in a CSV format. The downloaded file contains the dependency data across all servers enabled for dependency analysis.
Dependency information
Each row in the exported CSV corresponds to a dependency observed in the specified time slot.
The following table summarizes the fields in the exported CSV. Note that server name, application, and process fields are populated only for servers that have agentless dependency analysis enabled.
Field name | Details |
---|---|
Timeslot | The timeslot during which the dependency was observed. Dependency data is captured over 6-hour slots currently. |
Source server name | Name of the source server |
Source application | Name of the application on the source server |
Source process | Name of the process on the source server |
Destination server name | Name of the destination server |
Destination IP | IP address of the destination server |
Destination application | Name of the application on the destination server |
Destination process | Name of the process on the destination server |
Destination port | Port number on the destination server |
Stop dependency discovery
Select the servers on which you want to stop dependency discovery.
- In Azure Migrate: Discovery and assessment, select Discovered servers.
- Choose the Appliance name whose discovery you want to review.
- Select the Dependency analysis drop-down.
- Select Remove servers.
- In the Remove servers page, select the server, which you want to stop for dependency analysis.
- After selecting the servers, click Remove servers.
If you want to stop dependency simultaneously on multiple servers, you can use PowerShell to do so.
Start or stop dependency analysis using PowerShell
Download the PowerShell module from Azure PowerShell Samples repo on GitHub.
Log in to Azure
Log into your Azure subscription using the
Connect-AzAccount -Environment AzureChinaCloud
cmdlet.Connect-AzAccount -Environment AzureChinaCloud
Select the subscription in which you have created the project
select-azsubscription -subscription "Fabrikam Demo Subscription"
Import the downloaded AzMig_Dependencies PowerShell module
Import-Module .\AzMig_Dependencies.psm1
Enable or disable dependency data collection
Get the list of discovered servers in your project using the following commands. In the example below, the project name is FabrikamDemoProject, and the resource group it belongs to is FabrikamDemoRG. The list of servers will be saved in FabrikamDemo_VMs.csv
Get-AzMigDiscoveredVMwareVMs -ResourceGroupName "FabrikamDemoRG" -ProjectName "FabrikamDemoProject" -OutputCsvFile "FabrikamDemo_VMs.csv"
In the file, you can see the server display name, current status of dependency collection and the ARM ID of all discovered servers.
To enable or disable dependencies, create an input CSV file. The file is required to have a column with header "ARM ID". Any additional headers in the CSV file will be ignored. You can create the CSV using the file generated in the previous step. Create a copy of the file retaining the servers you want to enable or disable dependencies on.
In the following example, dependency analysis is being enabled on the list of servers in the input file FabrikamDemo_VMs_Enable.csv.
Set-AzMigDependencyMappingAgentless -InputCsvFile .\FabrikamDemo_VMs_Enable.csv -Enable
In the following example, dependency analysis is being disabled on the list of servers in the input file FabrikamDemo_VMs_Disable.csv.
Set-AzMigDependencyMappingAgentless -InputCsvFile .\FabrikamDemo_VMs_Disable.csv -Disable
Visualize network connections in Power BI
Azure Migrate offers a Power BI template that you can use to visualize network connections of many servers at once, and filter by process and server. To visualize, load the Power BI with dependency data as per the below instructions.
Download the PowerShell module and the Power BI template from Azure PowerShell Samples repo on GitHub.
Sign in to Azure using the below instructions:
Log in to your Azure subscription using the Connect-AzAccount -Environment AzureChinaCloud cmdlet.
Connect-AzAccount -Environment AzureChinaCloud
Select the subscription in which you have created the project
select-azsubscription -subscription "Fabrikam Demo Subscription"
Import the downloaded AzMig_Dependencies PowerShell module
Import-Module .\AzMig_Dependencies.psm1
Run the following command. This command downloads the dependencies data in a CSV and processes it to generate a list of unique dependencies that can be used for visualization in Power BI. In the example below the project name is FabrikamDemoProject, and the resource group it belongs to is FabrikamDemoRG. The dependencies will be downloaded for servers discovered by FabrikamAppliance. The unique dependencies are saved in FabrikamDemo_Dependencies.csv
Get-AzMigDependenciesAgentless -ResourceGroup FabrikamDemoRG -Appliance FabrikamAppliance -ProjectName FabrikamDemoProject -OutputCsvFile "FabrikamDemo_Dependencies.csv"
Open the downloaded Power BI template
Load the downloaded dependency data in Power BI.
- Open the template in Power BI.
- Select Get Data on the tool bar.
- Choose Text/CSV from Common data sources.
- Choose the dependencies file downloaded.
- Select Load.
- You'll see a table is imported with the name of the CSV file. You can see the table in the fields bar on the right. Rename it to AzMig_Dependencies
- Select refresh from the tool bar.
The Network Connections chart and the Source server name, Destination server name, Source process name, Destination process name slicers should light up with the imported data.
Visualize the map of network connections filtering by servers and processes. Save your file.
Next steps
Group servers for assessment.