linux qemu 报错 Unable to reserve 0xfffff000 bytes of virtual address space at 0x1000 解决方法
目录
错误现象
可能原因
解决过程
解决方法
错误现象
使用 qemu-i686 运行 i686平台文件 报错
qemu-i686: Unable to reserve 0xfffff000 bytes of virtual address space at 0x1000 (Success) for use as guest address space (check yourvirtual memory ulimit setting, min_mmap_addr or reserve less using -R option)
过程如下:
[root@localhost src]# /usr/local/qemu/bin/qemu-i686 test
qemu-i686: Unable to reserve 0xfffff000 bytes of virtual address space at 0x1000 (Success) for use as guest address space (check yourvirtual memory ulimit setting, min_mmap_addr or reserve less using -R option)
可能原因
Linux的虚拟地址空间范围为0~4G,Linux内核将这4G字节的空间分为两部分, 将最高的1G字节(从虚拟地址0xC0000000到0xFFFFFFFF)供内核使用,称为“内核空间”。而将较低的3G字节(从虚拟地址0x00000000到0xBFFFFFFF)供各个进程使用,称为“用户空间。
运行错误提示,使用的内存地址0xfffff000,不是用户空间内存地址,需要设置进程起始内存地址,具体原理可以参考 《linux 进程 地址空间 内存分布 简介》blog.csdn.net/whatday/article/details/122274743
解决过程
查看 qemu 帮助 版本
[root@localhost src]# /usr/local/qemu/bin/qemu-i686 --help
usage: qemu-i386 [options] program [arguments...]
Linux CPU emulator (compiled for i386 emulation)Options and associated environment variables:Argument Env-variable Description
-h print this help
-help
-g port QEMU_GDB wait gdb connection to 'port'
-L path QEMU_LD_PREFIX set the elf interpreter prefix to 'path'
-s size QEMU_STACK_SIZE set the stack size to 'size' bytes
-cpu model QEMU_CPU select CPU (-cpu help for list)
-E var=value QEMU_SET_ENV sets targets environment variable (see below)
-U var QEMU_UNSET_ENV unsets targets environment variable (see below)
-0 argv0 QEMU_ARGV0 forces target process argv[0] to be 'argv0'
-r uname QEMU_UNAME set qemu uname release string to 'uname'
-B address QEMU_GUEST_BASE set guest_base address to 'address'
-R size QEMU_RESERVED_VA reserve 'size' bytes for guest virtual address space
-d item[,...] QEMU_LOG enable logging of specified items (use '-d help' for a list of items)
-dfilter range[,...] QEMU_DFILTER filter logging based on address range
-D logfile QEMU_LOG_FILENAME write logs to 'logfile' (default stderr)
-p pagesize QEMU_PAGESIZE set the host page size to 'pagesize'
-singlestep QEMU_SINGLESTEP run in singlestep mode
-strace QEMU_STRACE log system calls
-seed QEMU_RAND_SEED Seed for pseudo-random number generator
-trace QEMU_TRACE [[enable=]<pattern>][,events=<file>][,file=<file>]
-plugin QEMU_PLUGIN [file=]<file>[,<argname>=<argvalue>]
-version QEMU_VERSION display version information and exitDefaults:
QEMU_LD_PREFIX = /usr/gnemul/qemu-i386
QEMU_STACK_SIZE = 8388608 byteYou can use -E and -U options or the QEMU_SET_ENV and
QEMU_UNSET_ENV environment variables to set and unset
environment variables for the target process.
It is possible to provide several variables by separating them
by commas in getsubopt(3) style. Additionally it is possible to
provide the -E and -U options multiple times.
The following lines are equivalent:-E var1=val2 -E var2=val2 -U LD_PRELOAD -U LD_DEBUG-E var1=val2,var2=val2 -U LD_PRELOAD,LD_DEBUGQEMU_SET_ENV=var1=val2,var2=val2 QEMU_UNSET_ENV=LD_PRELOAD,LD_DEBUG
Note that if you provide several changes to a single variable
the last change will stay in effect.See <https://qemu.org/contribute/report-a-bug> for how to report bugs.
More information on the QEMU project at <https://qemu.org>.[root@localhost src]# /usr/local/qemu/bin/qemu-i686 -version
qemu-i386 version 6.2.0
发现选项 -B address
set guest_base address to 'address'
设置guest_base地址为“address”
这个选项比较适合
解决方法
[root@localhost src]# /usr/local/qemu/bin/qemu-i686 -B 0x10000000 test
成功运行
linux qemu 报错 Unable to reserve 0xfffff000 bytes of virtual address space at 0x1000 解决方法相关推荐
- linux oracle 失败怎么办,Linux开机报错unable to load selinux policy怎么办?
Linux在开机的时候提示unable to load selinux policy错误,导致系统无法进入,通常是由2个情况所导致的,下面小编就给大家介绍下Linux开机报错unable to loa ...
- 连接mysql报错:Access denied for user ‘root’@‘localhost’(using password: YES)的解决方法
连接mysql报错:Access denied for user 'root'@'localhost'(using password: YES)的解决方法 参考文章: (1)连接mysql报错:Acc ...
- 前端开发:Vue报错Avoid mutating a prop directly since the value will be…的解决方法
前言 前端开发中,在使用Vue开发的时候,经常会遇到一些很共性的报错提示,而且有时候提示已经很明确的告诉开发者问题出现在哪里,尤其是在Chrome的控制台输出上面,只要看一下输出日志就知道问题所在.但 ...
- Python pip install 安装包报错ERROR: Could not find a version that satisfies the requirement XXX解决方法
Python pip install 安装包报错ERROR: Could not find a version that satisfies the requirement XXX解决方法 文章目录 ...
- keystone同步数据之后不报错,查看日志有错误,进入MySQL没有如何数据解决方法
解决方法如下: 重置数据库密码,远程禁止root用户登录改为 No 也就是第四次 mysql_secure_installation 第一次回车 这里就直接输入你的原root用户的密码(MySQL的r ...
- 数据库连接报错:Listener refused the connection with the following error: ORA-12505 的解决方法
使用SQL developer 连接用户时出现如题报错. 解决方法: 一:搜索"服务" 二:启动下图中选中的服务项
- pip/pip3 install 报错 “Could not find a version that satisfies the requriement xxx” 的解决方法
一.问题描述 pip/pip3 install 报错 "Could not find a version that satisfies the requriement xxx",如 ...
- SpringCloud工作笔记087---SpringBoot启动报错:IDEA 错误: 找不到或无法加载主类 解决方法_connected to the target VM, address:
技术交流QQ群[JAVA,C++,Python,.NET,BigData,AI]:170933152 idea 直接运行 springbootAplication 启动类,无法启动web项目,也没有报 ...
- Vue报错'Do not use built-in or reserved HTML elements as component id:解决方法
vue 在引入组件后无法显示组件内容且报错如下 : Do not use built-in or reserved HTML elements as component id 这是因为组件的命名和ht ...
最新文章
- Linux学习之CentOS(十二)--crontab命令的使用方法
- [osgearth][原]仿照谷歌,修改oe漫游器中focal(视角切换)功能
- jQueryEasyUi验证
- workflow initialization - GSWFWC
- bread是可数还是不可数_凡是规则,皆有例外——规则的可数名词复数,真的规则吗?...
- python葡萄酒数据集_利用python分析红葡萄酒数据
- 为什么要free释放内存_为什么在Free Code Camp上列出一份工作要花1,000美元?
- linux 串口格式化输出字符串,如何把电压这个浮点值转字符串输出到串口
- icd植入是大手术吗_母狗绝育是大手术吗?手术完需要住院吗?绝育后是不是会变胖?...
- 《Cocos2D-x权威指南》——3.1 节点类
- intel rst linux 驱动下载,Intel英特尔RST驱动 v 15.9.0.1015 官方版
- 全链路压测原理篇(方案 概念 架构 实现)
- Python乒乓球小游戏源代码
- 医院信息化建设,该何去何从?
- 企业OA管理系统需具备哪些功能?
- 【动态规划】爬楼梯爬的不仅仅是楼梯
- UE4(虚幻4)中蓝图的使用
- 解决eso搜索优化问题 Vue 有对应的 Nuxt.js。
- vlookup使用步骤_VLOOKUP函数的使用方法(入门级)
- python公众号留言功能_Python 爬取公众号文章、评论