Scanning vCenter Datastores

A scan of your vCenter datastores finds VMs and templates that are in inventory and out of inventory, as shown in the example in the following figure. A scan also finds other files on your datastore.

Not-in-inventory-other-files

Best Practice: When a datastore scan discovers an out-of-inventory VM, best practice is to determine if the VM is being used, and if it's not, delete the VM from disk.

Whenever you add a new datastore, run a manual scan on it. Otherwise, Commander scans the datastore on its next scheduled date.

The default period for which Commander is set to scan your datastore is once a week; however, that schedule must be enabled before a datastore scan can occur. You can change the schedule to daily, weekly, or weekdays only as required.

Running manual datastore scans

In Commander, you can manually scan your datastore to find VMs and files that are in inventory and out of inventory (VMs that are on disk but are not registered in the managed system). After the scan is complete, you can check the datastore details on the Summary tab of the Storage view or the datastore details under the Datastore tab on the Infrastructure or Applications view.

Best Practice: Run a datastore scan immediately upon activating Commander. This process provides the information necessary to display in the Storage Summary Report.

Access through:

Views menu > Inventory > Storage

Available to:

Administrator and All Operator Levels of Access Rights

You can also select a datastore from the Datastores tab on the Infrastructure or Applications views.

To run manual datastore scans:

  1. Right-click a datastore and select Scan Datastore.
  2. Click OK.

    When the scan is complete, the information is displayed in the General pane and the Usage Summary pane on the Summary tab panel for the selected datastore.

    If a scan has failed, verify that the managed system can communicate with the datastore. For ESX servers, check the configuration credentials.

Usage summary and details for a datastore

To see the usage summary and details for a datastore, open the Storage view, and expand the tree until you select your datastore.

The provisioning level of your datastore equals the used and uncommitted amounts in your datastore.

Use these details to help you determine if your datastore is over-provisioned.

usage_summary_datastore

Why a datastore scan can fail

The following troubleshooting options don't apply to ESX 3i managed hosts.

  • If the primary method of datastore scanning (directly through the VMware API) is unavailable, host credentials are used as a fallback method on ESX servers. If the host has not been configured with the correct credentials, the fallback method will fail. See Configuring host credentials to learn how to configure credentials for a specific host.
  • If a VM name contains the following ASCII characters not supported by VMware:

    # $ % & ( + / ; @ [ \ ] ^ ` { } ~

    and all high-ASCII characters above 128

    Don't use these characters in VM names.

  • If a datacenter or folder name contains the following ASCII characters, the retrieval of VM information during a scan may fail:

    space % & + / = ? \

    Don't use these characters in datacenter or folder names.

  • If a datastore name contains the following characters:

    % & + / = ? [ \ ]

    and all high-ASCII characters (above 128)

    Don't use these characters in datastore names.

Scanning the datastore files for selected VMs

You can manually scan a datastore for the files of a single Windows VM or a group of Windows VMs at any time. For example, if you notice that a snapshot count for a VM has increased, you can perform a scan on that VM to see the size of its files.

Access through:

Views menu > Inventory > Infrastructure or Applications

Available to:

Administrator and All Operator Levels of Access Rights

To scan VM datastore files, follow this procedure.

  1. Navigate to and select the VM either through the tree or the Virtual Machines tab.
  2. Right-click and choose Configuration Management > Scan Datastore Files.
  3. Click OK.

Viewing the datastore files for VMs

Access through:

Views menu > Infrastructure, Applications, or Storage

Available to:

All Access Rights Levels

To view the names, types, sizes and paths of the files for a VM stored on vCenter, click Click to View in the General pane on the Summary tab after you have selected a VM (or select the VM on the Infrastructure or Applications tree, right-click, and click Configuration Management > View Files). The View Files window is displayed with the details of the files.

You can't view any VM files until after a datastore scan has occurred either for the entire datastore or for the individual VM.

Configuring the schedule for the global Datastore Scan task

Access through:

Tools > Scheduled Tasks

Available to:

All Access Rights Levels

Superuser can Override Schedules

To configure the schedule for the global Datastore Scan task:

  1. On the Scheduled Tasks page, select the Global datastore scan as displayed in the following example, and click Edit.
  2. On the Scheduling page of the Configure Scheduled Task wizard, do any of the following, then click Next:
    • To have scheduling take effect immediately, select Enabled.

      You can edit the scheduled task at any time to enable or disable it.

    • To schedule the frequency and the time for the task, select when you want the task to occur: daily, weekly, monthly, or weekdays. You can also specify that the task be performed only once (in which case the task will be removed from the Scheduled Tasks list after it has been run).
    • If you selected a weekly or monthly frequency, select the day of the week or the month from the drop-down menu.

      If you select 31 for the day of month for a monthly frequency, Commander automatically adjusts the day to reflect the last day of any given month. The same adjustment is made if you select 29 or 30 for February.

  3. On the Summary page, review the details and click Finish.

    The scheduled task is updated in the list of scheduled tasks.