The following example outlines how to list entities in the {virt-product-fullname} {engine-name}. In this example, the entities to be listed are virtual machines, which are listed using the getVMs() method of the Api class.

Procedure
  1. Declare a List of the type of entity to be listed and use the corresponding method to get the list of entities:

    List<VM> vms = api.getVMs().list();