This is quite inefficient - we could do:

    vms = @compute_resource.vms(:eager_loading => true).map(&:identity)
    associated_hosts = Host.where(:compute_resource_id => @compute_resource.id, :uuid => vms)