Run an inventory discovery

Inventory discovery lets you scan and list all the virtual machine (VM) instances in your infrastructure. By using inventory discovery, you can determine the characteristics of the VMs, such as operating system type, storage, number of cores, and other basic information. For VMs running on VMware, inventory discovery also lets you collect the performance data.

This document describes the steps to run an inventory discovery using the Migration Center discovery client CLI.

Before you begin

  1. Review the requirements for downloading and running the mcdc CLI.
  2. Complete the steps to download mcdc CLI.

Run an inventory discovery on VMware using vSphere API

Use the vSphere API to collect data about all VMs in a vCenter visible to the user running the mcdc CLI. You can also scope a discovery to a specific folder, cluster, or data center.

Configure vCenter

If you plan to export the collected data to Migration Center, before you run an inventory discovery, you need to configure your vCenter environment. The data you collect with mcdc CLI, in fact, depend on the settings for statistics in vCenter.

vCenter supports four levels of statistics:

  • Level 1 exposes only CPU and memory performance.
  • Level 2 exposes the network performance.
  • Level 3 exposes input/output operations per second (IOPS).
  • Level 4 exposes all the available metrics.

For a detailed list of the available metrics for all statistics levels, see Data collection levels.

By default, the statistics level is set to level 1. Levels 1 and 2 let you collect partial data about your infrastructure, while level 3 lets you collect everything you need to generate a complete total cost of ownership (TCO) report. After the statistics level is changed in vCenter, it might take several hours for performance data to become available.

For more information on how to change statistics levels in vCenter, see Configure statistics collection intervals in the vSphere client.

Run the discovery

  1. Change to the directory where you downloaded the mcdc CLI.
  2. Run the discovery:

    Linux

    ./mcdc discover vsphere -u USERNAME --url https://VSPHERE_URL

    Windows

    mcdc.exe discover vsphere -u USERNAME --url https://VSPHERE_URL

    Replace the following:

    • USERNAME: your vCenter username
    • VSPHERE_URL: the URL for your vCenter Server instance or the vSphere Client

    To avoid a certificate check for connecting to the vCenter, include the -i (insecure) flag in the command.

  3. When prompted, enter the vCenter password.

After the inventory discovery is complete, the collected data is stored in the local database.

Scope a discovery

  • Run the discovery at the root:

    Linux

    ./mcdc discover vsphere --url https://VSPHERE_URL -u USERNAME --path /

    Windows

    mcdc.exe discover vsphere --url https://VSPHERE_URL -u USERNAME --path /

  • Run the discovery at a specific folder:

    Linux

    ./mcdc discover vsphere --url https://VSPHERE_URL -u USERNAME --path DATACENTER/vm/FOLDER

    Windows

    mcdc.exe discover vsphere --url https://VSPHERE_URL -u USERNAME --path DATACENTER/vm/FOLDER

    Replace the following:

    • DATACENTER: the name of the data center
    • FOLDER: the path to the folder
  • Run the discovery at a specific cluster:

    Linux

    ./mcdc discover vsphere --url https://VSPHERE_URL -u USERNAME --path DATACENTER/host/CLUSTER

    Windows

    mcdc.exe discover vsphere --url https://VSPHERE_URL -u USERNAME --path DATACENTER/host/CLUSTER

    Replace the following:

    • CLUSTER: the name of the cluster
  • Run the discovery at a specific data center:

    Linux

    ./mcdc discover vsphere --url https://VSPHERE_URL -u USERNAME --path DATACENTER

    Windows

    mcdc.exe discover vsphere --url https://VSPHERE_URL -u USERNAME --path DATACENTER

To avoid a certificate check for connecting to the vCenter, include the -i (insecure) flag in the command.

Adjust timeout

The default timeout is 60 minutes. However, when you run inventory discovery against a vCenter server with more than 1000 VMs or guest collection against a vCenter server with more than 100 VMs, increase the timeout in proportion to the total number of VMs.

If you run an inventory discovery, then for every 1000 additional VMs, increase the timeout by 60 minutes. For example, if you have 2000 VMs, then set the timeout to 120 minutes.

If you run a guest discovery, then for every 100 additional VMs, increase the timeout by 60 minutes. For example, if you have 300 VMs, then set the timeout to 180 minutes.

  • To change the timeout setting, set the --timeout flag to the required timeout:

    Linux

    ./mcdc discover vsphere -u USERNAME --url https://VSPHERE_URL --timeout TIMEOUT_IN_SECONDS

    Windows

    mcdc.exe discover vsphere -u USERNAME --url https://VSPHERE_URL --timeout TIMEOUT_IN_SECONDS

    Replace TIMEOUT_IN_SECONDS with the timeout in seconds.

At this point, to check whether the data about all your infrastructure has been collected, you can either use the discover ls command or run an offline assessment. However, for a complete assessment of VMs running on VMware, after you've completed running the inventory discovery, you can run a guest discovery.

Run an inventory discovery on VMware using RVTools

For VMs running on VMware, the mcdc CLI lets you analyze the XLSX report files generated with RVTools.

  • Collect data based on your existing RVTools export:

    Linux

    ./mcdc discover rvtools REPORT_NAME.xlsx

    Windows

    mcdc.exe discover rvtools REPORT_NAME.xlsx

    Replace REPORT_NAME with the path to the XLSX generated with RVTools.

However, this method has following limitations:

  • The mcdc CLI doesn't support tables generated with the --DBColumnNames flag in RVTools.
  • The mcdc CLI doesn't support exporting the data collected using this method to Migration Center. However, you can use it to run an offline assessment.

Run an inventory discovery on AWS

  • Run the inventory discovery:

    Linux

    ./mcdc discover aws -r REGION

    Windows

    mcdc.exe discover aws -r REGION

    Replace REGION with the AWS region.

    The mcdc CLI prompts you for your access key ID and secret access key.

    The output should look similar to the following:

    Collected 166 VMs
    [✓] Collection completed.
    

Adjust timeout

By default, the timeout is set to 60 minutes. However, when you run inventory discovery against an AWS region with more than 10,000 VMs, increase the timeout in proportion to the total number of VMs in that region.

  • To change the timeout setting, set the --timeout flag to the required timeout:

    Linux

    ./mcdc discover aws -r REGION --timeout TIMEOUT_IN_SECONDS

    Windows

    mcdc.exe discover aws -r REGION --timeout TIMEOUT_IN_SECONDS

    Replace TIMEOUT_IN_SECONDS with the timeout in seconds.

At this point, to check whether the data about all your infrastructure has been collected, you can either use the discover ls command or run an offline assessment. However, for a complete assessment of EC2 VMs, after you've completed running the inventory discovery, you can run a guest discovery.

What's next