You are now viewing Migrate to Virtual Machines (formerly Migrate for Compute Engine). For Migrate for Compute Engine versions 4.x, see the 4.x documentation.

Method: projects.locations.sources.fetchInventory

Stay organized with collections Save and categorize content based on your preferences.

List remote source's inventory of VMs. The remote source is the onprem vCenter (remote in the sense it's not in Compute Engine). The inventory describes the list of existing VMs in that source. Note that this operation lists the VMs on the remote source, as opposed to listing the MigratingVms resources in the vmmigration service.

HTTP request


The URL uses gRPC Transcoding syntax.

Path parameters



Required. The name of the Source.

Authorization requires the following IAM permission on the specified resource source:

  • vmmigration.sources.get

Query parameters



If this flag is set to true, the source will be queried instead of using cached results. Using this flag will make the call slower.



The maximum number of VMs to return. The service may return fewer than this value. For AWS source: If unspecified, at most 500 VMs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. For VMWare source: If unspecified, all VMs will be returned. There is no limit for maximum value.



A page token, received from a previous sources.fetchInventory call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to sources.fetchInventory must match the call that provided the page token.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Response message for fetchInventory.

JSON representation
  "updateTime": string,
  "nextPageToken": string,
  "vmwareVms": {
    object (VmwareVmsDetails)

string (Timestamp format)

Output only. The timestamp when the source was last queried (if the result is from the cache).

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".



Output only. A token, which can be sent as pageToken to retrieve the next page. If this field is omitted, there are no subsequent pages.


object (VmwareVmsDetails)

The description of the VMs in a Source of type Vmware.

Authorization Scopes

Requires the following OAuth scope:


For more information, see the Authentication Overview.


VmwareVmsDetails describes VMs in vCenter.

JSON representation
  "details": [
      object (VmwareVmDetails)

object (VmwareVmDetails)

The details of the vmware VMs.