def get_guest_used_mem(cls, vm): """ Guest OS reported used memory size in MB. :param vm: VM Object :return: used memory report by guest OS in MB """ os_type = vm.params.get("os_type") timeout = float(vm.params.get("login_timeout", 600)) session = vm.wait_for_login(timeout=timeout) try: return utils_misc.get_used_mem(session, os_type) finally: session.close()
def get_guest_used_mem(cls, vm): """ Guest OS reported used memory size in MB. :param vm: VM Object :return: used memory report by guest OS in MB """ os_type = vm.params.get("os_type") timeout = float(vm.params.get("login_timeout", 600)) session = vm.wait_for_login(timeout=timeout) try: return utils_misc.get_used_mem(session, os_type) finally: session.close()