# Name

VixFindItemType

# Description

These are the types of searches you can do with VixHost_FindItems().

# Values

VIX_FIND_RUNNING_VMS
  Finds all virtual machines currently running on the host.

VIX_FIND_REGISTERED_VMS
  Finds all virtual machines registered on the host. This search applies only to platform products that maintain a virtual machine registry, such as ESX/ESXi and VMware Server, but not Workstation or Player.

# Requirements

vix.h, since VMware Server 1.0.

# Example

This example shows how to initiate a search for running virtual machines. The results of the search are to be collected in a callback routine named VixDiscoveryProc(). See the functional description for VixHost_FindItems() for a more complete sample.

    VixError err = VIX_OK;
    VixHandle jobHandle = VIX_INVALID_HANDLE;
    VixHandle hostHandle = VIX_HANDLETYPE_NONE;

    // Connect to the host:
    jobHandle = VixHost_Connect(...);
    ...
    // Release handle when done:
    Vix_ReleaseHandle(jobHandle);

    jobHandle = VixHost_FindItems(hostHandle,
                                  Vix_FIND_RUNNING_VMS,
                                  VIX_INVALID_HANDLE, // searchCriteria
                                  -1, // timeout
                                  VixDiscoveryProc,
                                  NULL);
    err = VixJob_Wait(jobHandle, Vix_PROPERTY_NONE);
    ...

Copyright (C) 2007-2008 VMware, Inc. All rights reserved.