def associate_vm(vm)
host = compute_resource.associated_host(vm)
datacenter = compute_resource.uuid
vm_datacenter = vm.datacenter
if host.present?
if vm_datacenter == datacenter
host.associate!(compute_resource, vm)
@hosts << host
end
end