win11 qemu 简明教程
一、使用教程:
1 G:\qemuWorkspaces>dir
2 Volume in drive G is w_workspaces
3 Volume Serial Number is B8D4-6DEE
4
5 Directory of G:\qemuWorkspaces
6
7 10/02/2022 00:22 <DIR> .
8 10/02/2022 00:08 1,493,499,904 rocky-mini-90.iso
9 1 File(s) 1,493,499,904 bytes
10 1 Dir(s) 267,645,575,168 bytes free
11
12 G:\qemuWorkspaces>
13 G:\qemuWorkspaces>qemu-img create rocky90.img 40G
14 Formatting 'rocky90.img', fmt=raw size=42949672960
15
16 G:\qemuWorkspaces>
17 G:\qemuWorkspaces>qemu-system-x86_64 -boot d -m 4096 -hda rocky90.img -cdrom rocky-mini-90.iso
18 WARNING: Image format was not specified for 'rocky90.img' and probing guessed raw.
19 Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
20 Specify the 'raw' format explicitly to remove the restrictions.
21
22 (qemu:18180): Gtk-WARNING **: 00:22:52.039: Could not load a pixbuf from icon theme.
23 This may indicate that pixbuf loaders or the mime database could not be found.
二、操作说明
1 1、先创建“虚拟磁盘”: G:\qemuWorkspaces>qemu-img create rocky90.img 40G
2
3
4
5 2、创建虚拟机:G:\qemuWorkspaces>qemu-system-x86_64 -boot d -m 4096 -hda rocky90.img -cdrom rocky-mini-90.iso
6
7 -boot d: 指定虚拟机启动的方式(d= cdrom ,光驱启动)
8 -m 4096: 指定虚拟机的内存大小:4096M,4G
9 -hda rocky90.img: 指定虚拟机的硬盘
10 -cdrom rocky-mini-90.iso: 指定虚拟机的光驱文件(iso的安装镜像)
三、场景展示
1、cmd命令行图片展示
2、qemu虚拟机展示
四、参考资料
1 1、qemu 下载(windows)
2
3 1.1 win32: https://qemu.weilnetz.de/w32/
4 1.2 win64: https://qemu.weilnetz.de/w64/
5
6
7 2、rocky 镜像下载:
8
9 2.1 镜像名称: Rocky-9.0-20220805.0-x86_64-minimal.iso
10 2.2 下载地址(中科大): https://mirrors.ustc.edu.cn/rocky/9/isos/x86_64/
11
12
13 3、官网版qemu使用教程 https://www.bilibili.com/video/av203470885
14
15
16 4、qemu参数说明 https://blog.csdn.net/taiyang1987912/article/details/125743105
17
18 -name 设置虚拟机名称
19 -m 指定虚拟机内存大小
20 -smp 设置虚拟机CPU数
21 -cpu 选择CPU
22 -hda 选择使用*.qcow2 作为IDE硬盘镜像
23 -cdrom 选择使用*.iso作为cdrom安装镜像
24 -boot 选择启动类型: floppy (a), hard disk ©, CD-ROM (d), network (n)
25 -enable-kvm 使能KVM支持:enable KVM full virtualization support
26 -netdev 配置主机的虚拟网卡:configure a host TAP network backend with ID ‘str’
27 type 类型 ifname 名称 connected to a bridge (default=br0)
28 script:use network scripts ‘file’ (default=/etc/qemu-ifup)
29 -device 配置虚拟机的网卡类型
30 -vnc 配置VNC端口
本文由 lnlidawei 原创、整理、转载,本文来自于【博客园】; 整理和转载的文章的版权归属于【原创作者】; 转载或引用时请【保留文章的来源信息】:https://www.cnblogs.com/lnlidawei/p/16748136.html