checkNotNull(from, "VApp");
// TODO make this work with composite vApps
if (from == null)
return null;
VirtualHardwareSection hardware = findVirtualHardwareSectionForVm.apply(from);
HardwareBuilder builder = rasdToHardwareBuilder.apply(hardware.getItems());
builder.location(findLocationForResource.apply(Iterables.find(checkNotNull(from, "from").getLinks(),
LinkPredicates.typeEquals(VCloudDirectorMediaType.VDC))));
builder.ids(from.getHref().toASCIIString()).name(from.getName()).supportsImage(
ImagePredicates.idEquals(from.getHref().toASCIIString()));
builder.hypervisor("VMware");