谷动谷力

 找回密码
 立即注册
查看: 2428|回复: 0
打印 上一主题 下一主题
收起左侧

QEMU安装及内核和镜像准备 使用方法

[复制链接]
跳转到指定楼层
楼主
发表于 2021-12-26 22:45:37 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
QEMU安装及内核和镜像准备


QEMU是什么?

Qemu is a very old virtualization technology used to virtualize system components and run operating systems on it. Before KVM and XEN QEMU was used heavily but it can not race with VMWARE or VIRTUAL PC. But with the KVM Qemu get superfast speed for computing by using hardware-based virtualization. QEMU acts as a hardware supplier and KVM is the CPU. KVM resides in Linux kernel and there is a little configuration for it. A virtualization configuration is made on the QEMU.
  Qemu是一种非常古老的虚拟化技术,用于虚拟化系统组件并在其上运行操​​作系统。 在大量使用KVM和XEN QEMU之前,但它无法与VMWARE或VIRTUAL PC竞争。 但是借助KVM,Qemu可以通过使用基于硬件的虚拟化来获得超快的计算速度。 QEMU充当硬件供应商,KVM是CPU。 KVM驻留在Linux内核中,并且需要一些配置。 在QEMU上进行了虚拟化配置。

   qemu-kvm或qemu或qemu-system-x86_64 (qemu-kvm or qemu or qemu-system-x86_64)

  Qemu is a very old and big project which has different user bases and intersecting with different projects. Qemu is used in the Linux Kernel Virtualization project named KVM. So this project also provides Qemu with different command names but with more features. qemu-system-x86_64 is the binary or command for Qemu which is used to create 64-bit x86 VMs.
   Qemu是一个非常古老而庞大的项目,它具有不同的用户基础,并且与不同的项目相交。 Qemu用于名为KVMLinux内核虚拟化项目。 因此,该项目还为Qemu提供了不同的命令名称,但具有更多功能。 qemu-system-x86_64是Qemu的二进制或命令,用于创建64位x86 VM。



windows 7/10环境下:

一、下载QEMU,安装
https://www.qemu.org/download/#windows
  我的电脑是64位,下载的 qemu-w64-setup-20200612.exe
  安装时有选项,安装arm的即可,其他的cpu架构可以不装。

二、准备内核和镜像
  由于arm版本的不同,我们使用网上已经编译好的内核版本和树配置文件
https://github.com/dhruvvyas90/qemu-rpi-kernel
  直接全部用git pull下来或者仅下载: kernel-qemu-4.19.50-buster 、 versatile-pb-buster.dtb
  去官网下载img:
        http://downloads.raspberrypi.org/raspbian_lite/images/
  http://downloads.raspberrypi.org/raspbian_full/images/

  kernel-qemu-4.19.50-buster —— Linux内核
  versatile-pb-buster.dtb —— 设备树
  2019-09-26-raspbian-buster-lite.img —— 树莓派精简版镜像,没有GUI,实际上只用到里面的配置、驱动、根文件系统,里面的 Linux内核、设备树未使用
  2020-05-27-raspios-buster-full-armhf.img —— 树莓派完整版镜像,有GUI画面,实际上只用到里面的配置、驱动、根文件系统,里面的 Linux内核、设备树未使用

Linux Ubuntu,Debian,Mint,Kali等发布系统环境下

使用apt安装, 命令:
  1. sudo apt install qemu
复制代码

Linux Fedora,CentOS,Red Hat 等发布系统环境下
基于rpm的安装,我们将根据分发使用dnf和yum软件包管理器。
  1. sudo dnf install qemu
复制代码
OR
  1. sudo yum install qemu
复制代码
内核和镜像获取与上面一样

qemu命令帮助 (qemu Command Help)  We can list short help information about the qemu like below by using -h option.
  我们可以使用-h选项列出有关qemu简短帮助信息,如下所示。
  1. qemu-system-x86_64 -h
复制代码


      
      Help   
qemu命令语法(qemu Command Syntax)
  Qemu syntax is the same as most of the Linux commands.
Qemu语法与大多数Linux命令相同。
  qemu-system-x86_64 OPTIONS IMAGE  
  • OPTIONS are provided for VM options like Ram size, features, CPU, Graphics, etc.
    OPTIONS提供了VM选项,如RAM大小,功能,CPU,显卡等。
  • IMAGE is the file name of the disk for the VM.
    IMAGE是VM磁盘的文件名。


+10
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|深圳市光明谷科技有限公司|光明谷商城|Sunshine Silicon Corpporation ( 粤ICP备14060730号|Sitemap

GMT+8, 2024-5-8 07:31 , Processed in 0.134094 second(s), 41 queries .

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表