linux下载qemu源码编译安装,Ubuntu 18.04.3 LTS源码安装QEMU 4.1.0

本文详细介绍了如何在Ubuntu 18.04.3 LTS上通过源码编译安装最新版QEMU 4.1.0。QEMU是一个通用的开源机器模拟器和虚拟器,支持多种体系结构,可用于运行不同平台的操作系统。安装步骤包括下载源码、解压、配置、编译和安装。此外,还提到了使用Linux存储库安装QEMU的方法以及适用于其他Linux发行版的命令。

最新版QEMU 4.1.0已经发布了,QEMU是一个通用的开源机器模拟器和虚拟器。可以在任何支持的体系结构上为任何机器运行操作系统。

当QEMU用作机器模拟器时,它可以在不同的机器(例如您自己的PC)上运行为一台机器(例如ARM板)编写的操作系统和程序。通过使用动态转换,达到了很好的性能。

当用作虚拟器时,QEMU通过直接在主机CPU上执行客户代码来实现接近本地的性能。当在Xen管理程序下执行或使用Linux中的KVM内核模块时,QEMU支持虚拟化。在使用KVM时,QEMU可以虚拟化x86、服务器和嵌入式PowerPC、64位POWER、S390、32位和64位ARM以及MIPS客户端。

要安装最新版QEMU请使用源码安装,截止2019年8月17日,最新版为QEMU 4.1.0

62d3c05020efd83573128b5e52cf7130.png

QEMU 4.1.0

1.系统软硬件

系统:Ubuntu/Debian(这里是Ubuntu 18.04.3 LTS)

图形界面:Gnome3

软件:QEMU源码包

2.网站链接

QEMU官网:www.qemu.org

二.安装步骤

1、下载源代码

linuxidc@linuxidc:~/www.linuxidc.com$ wget https://download.qemu.org/qemu-4.1.0.tar.xz

3739683ecd7f6df44bcb6d90eb8446e2.png

root@kubevirt1910b:/data/vm# qemu-system-aarch64 -machine virt -cpu help | grep -E "cortex|armv8" cortex-a15 cortex-a53 cortex-a57 cortex-a7 cortex-a72 cortex-a8 cortex-a9 cortex-m0 cortex-m3 cortex-m33 cortex-m4 cortex-r5 cortex-r5f "monitor.go:154","timestamp":"2025-10-19T08:01:05.091290Z"} {"component":"virt-launcher","level":"warning","msg":"MDEV_PCI_RESOURCE_HUAWEI_COM_ASCEND910 not set for resource huawei.com/Ascend910","pos":"addresspool.go:51","timestamp":"2025-10-19T08:01:05.735405Z"} {"component":"virt-launcher","level":"warning","msg":"USB_RESOURCE_HUAWEI_COM_ASCEND910 not set for resource huawei.com/Ascend910","pos":"addresspool.go:51","timestamp":"2025-10-19T08:01:05.735535Z"} {"component":"virt-launcher","level":"info","msg":"host-devices created: [0000:42:00.0]","pos":"hostdev.go:119","timestamp":"2025-10-19T08:01:05.735733Z"} {"component":"virt-launcher","level":"info","msg":"Hardware emulation device '/dev/kvm' not present. Using software emulation.","pos":"converter.go:1313","timestamp":"2025-10-19T08:01:05.735842Z"} {"component":"virt-launcher","level":"info","msg":"generated nocloud iso file /var/run/kubevirt-ephemeral-disks/cloud-init-data/default/ubuntu20-vm/noCloud.iso","pos":"cloud-init.go:690","timestamp":"2025-10-19T08:01:05.853655Z"} {"component":"virt-launcher","level":"error","msg":"this function is not supported by the connection driver: cannot translate CPU model armv8-a to a supported model","pos":"virCPUTranslate:1004","subcomponent":"libvirt","thread":"30","timestamp":"2025-10-19T08:01:05.859000Z"} {"component":"virt-launcher","level":"error","msg":"Unable to open file: /var/run/kubevirt-private/libvirt/qemu/log/default_ubuntu20-vm.log: No such file or directory","pos":"virNetClientProgramDispatchError:170","subcomponent":"libvirt","thread":"30","timestamp":"2025-10-19T08:01:05.860000Z"} {"component":"virt-launcher","kind":"","level":"error","msg":"Failed to start VirtualMachineInstance with flags 0.","name":"ubuntu20-vm","namespace":"default","pos":"manager.go:1280","reason":"virError(Code=3, Domain=31, Message='this function is not supported by the connection driver: cannot translate CPU model armv8-a to a supported model')","timestamp":"2025-10-19T08:01:05.862293Z","uid":"9bc000ed-4a97-4963-9f70-50b77ab08dd6"} {"component":"virt-launcher","kind":"","level":"error","msg":"Failed to sync vmi","name":"ubuntu20-vm","namespace":"default","pos":"server.go:202","reason":"virError(Code=3, Domain=31, Message='this function is not supported by the connection driver: cannot translate CPU model armv8-a to a supported model')","timestamp":"2025-10-19T08:01:05.862425Z","uid":"9bc000ed-4a97-4963-9f70-50b77ab08dd6"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:06.090812Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:07.091386Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:08.090797Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:09.090963Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:10.091396Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:11.090571Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:12.090629Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:13.090724Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:14.091325Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:15.090522Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:16.090748Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:17.090999Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:18.091442Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:19.090770Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:20.090979Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:21.091323Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:22.090529Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:23.090790Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:24.091097Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:25.091443Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:26.090481Z"} {"component":"virt-launcher","level":"warning","msg":"MDEV_PCI_RESOURCE_HUAWEI_COM_ASCEND910 not set for resource huawei.com/Ascend910","pos":"addresspool.go:51","timestamp":"2025-10-19T08:01:26.455059Z"} {"component":"virt-launcher","level":"warning","msg":"USB_RESOURCE_HUAWEI_COM_ASCEND910 not set for resource huawei.com/Ascend910","pos":"addresspool.go:51","timestamp":"2025-10-19T08:01:26.455182Z"} {"component":"virt-launcher","level":"info","msg":"host-devices created: [0000:42:00.0]","pos":"hostdev.go:119","timestamp":"2025-10-19T08:01:26.455327Z"} {"component":"virt-launcher","level":"info","msg":"Hardware emulation device '/dev/kvm' not present. Using software emulation.","pos":"converter.go:1313","timestamp":"2025-10-19T08:01:26.455381Z"} {"component":"virt-launcher","level":"info","msg":"generated nocloud iso file /var/run/kubevirt-ephemeral-disks/cloud-init-data/default/ubuntu20-vm/noCloud.iso","pos":"cloud-init.go:690","timestamp":"2025-10-19T08:01:26.569097Z"} {"component":"virt-launcher","level":"error","msg":"this function is not supported by the connection driver: cannot translate CPU model armv8-a to a supported model","pos":"virCPUTranslate:1004","subcomponent":"libvirt","thread":"32","timestamp":"2025-10-19T08:01:26.575000Z"} {"component":"virt-launcher","level":"error","msg":"Unable to open file: /var/run/kubevirt-private/libvirt/qemu/log/default_ubuntu20-vm.log: No such file or directory","pos":"virNetClientProgramDispatchError:170","subcomponent":"libvirt","thread":"32","timestamp":"2025-10-19T08:01:26.576000Z"} {"component":"virt-launcher","kind":"","level":"error","msg":"Failed to start VirtualMachineInstance with flags 0.","name":"ubuntu20-vm","namespace":"default","pos":"manager.go:1280","reason":"virError(Code=3, Domain=31, Message='this function is not supported by the connection driver: cannot translate CPU model armv8-a to a supported model')","timestamp":"2025-10-19T08:01:26.577856Z","uid":"9bc000ed-4a97-4963-9f70-50b77ab08dd6"} {"component":"virt-launcher","kind":"","level":"error","msg":"Failed to sync vmi","name":"ubuntu20-vm","namespace":"default","pos":"server.go:202","reason":"virError(Code=3, Domain=31, Message='this function is not supported by the connection driver: cannot translate CPU model armv8-a to a supported model')","timestamp":"2025-10-19T08:01:26.578021Z","uid":"9bc000ed-4a97-4963-9f70-50b77ab08dd6"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:27.090452Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:28.090824Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:29.091270Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:30.091535Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:31.090724Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:32.091013Z"} {"component":"virt-launcher","level":"info","msg":"Still missing PID for default_ubuntu20-vm, open /run/libvirt/qemu/run/default_ubuntu20-vm.pid: no such file or directory","pos":"monitor.go:154","timestamp":"2025-10-19T08:01:33.091239Z"} 服务器品牌:HUAWEI 服务器型号:A800I A2 CPU架构:aarch64 CPU厂商:海思 CPU型号:鲲鹏 920 CPU数量:4C48核 内存大小:1508G 硬盘容量: sda 机械硬盘 / SSD:447.1GB 系统盘,已分区: - sda1(200MB):EFI 引导分区 - sda2(1GB):/boot 分区 - sda3(50GB):根目录(/) - sda4395.9GB):容器存储和 /var 目录 sdb 机械硬盘 / SSD 447.1GB 未分区、未挂载,处于空闲状态 nvme0n1 NVMe 固态硬盘 2.9TB 未分区、未挂载,处于空闲状态 nvme1n1 NVMe 固态硬盘 2.9TB 未分区、未挂载,处于空闲状态 安装系统:Ubuntu 22.04 LTS 系统架构:arm64 内核版本:Linux 5.15.0-25-generic NPU型号:华为昇腾910B NPU序号:d802 NPU驱动:25.2.2 Kubevirt:quay.io/kubevirt/virt-operator:v1.4.0 K8S版本:v1.27.16 Compiled against library: libvirt 8.0.0 Using library: libvirt 8.0.0 Using API: QEMU 8.0.0 Running hypervisor: QEMU 4.1.0
最新发布
10-20
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值