'Get information about the VM.'

def get_info(self, instance):

    LOG.debug('get_info    called    for    instance', instance=instance)
    instance_name = instance.name
    if (not self._vmutils.vm_exists(instance_name)):
        raise exception.InstanceNotFound(instance_id=instance.uuid)
    info = self._vmutils.get_vm_summary_info(instance_name)
    state = constants.HYPERV_POWER_STATE[info['EnabledState']]
    return hardware.InstanceInfo(state=state, max_mem_kb=info['MemoryUsage'], mem_kb=info['MemoryUsage'], num_cpu=info['NumberOfProcessors'], cpu_time_ns=info['UpTime'])
