'Return data about the VM instance.'

def get_info(self, instance):

    vm_ref = vm_util.get_vm_ref(self._session, instance)
    lst_properties = ['summary.config.numCpu', 'summary.config.memorySizeMB', 'runtime.powerState']
    try:
        vm_props = self._session._call_method(vutil, 'get_object_properties_dict', vm_ref, lst_properties)
    except vexc.ManagedObjectNotFoundException:
        raise exception.InstanceNotFound(instance_id=instance.uuid)
    max_mem = (int(vm_props.get('summary.config.memorySizeMB', 0)) * 1024)
    num_cpu = int(vm_props.get('summary.config.numCpu', 0))
    return hardware.InstanceInfo(state=constants.POWER_STATES[vm_props['runtime.powerState']], max_mem_kb=max_mem, mem_kb=max_mem, num_cpu=num_cpu)
