You can use the getDecendentMoRefs() method of ServiceUtil to find all the ManagedObjectReferences of a particular type (i.e. VirtualMachine or HostSystem).
If you want to document the relationships between the two, you will need to use getObjectProperties in the same package to obtain the appropriate property for your report.