File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ QEMU 与 KVM 的关系是互补的。当二者结合使用时,QEMU 负责提
6666
6767### 第一台虚拟机
6868
69- 以下实例命令用于启动一个使用 KVM, 带有双核 CPU, 1GB 内存,使用一个名为 ` example.img ` 的磁盘镜像文件和用户态网络的虚拟机 。
69+ 以下实例命令用于启动一个使用 KVM, 带有双核 CPU、 1GB 内存,使用一个名为 ` example.img ` 的磁盘镜像文件,挂载了 ` livecd.iso ` 作为光盘文件,和用户态网络的虚拟机 。
7070
7171``` bash
7272qemu-system-x86_64 \
@@ -75,6 +75,7 @@ qemu-system-x86_64 \
7575 -cpu host \
7676 -smp cores=2 \
7777 -drive file=example.img,format=raw,if=virtio \
78+ -cdrom ./livecd.iso \
7879 -nic user,model=virtio
7980```
8081
@@ -86,6 +87,7 @@ qemu-system-x86_64 \
8687- ` -cpu host ` : 使用宿主机 CPU 模型。
8788- ` -smp cores=2 ` : 使用 2 个 CPU 核心。
8889- ` -drive file=example.img,format=raw,if=virtio ` : 使用 ` example.img ` 作为磁盘镜像,格式为 ` raw ` ,使用 ` virtio ` 设备模型。
90+ - 可以使用 ` truncate -s 2G example.img ` 或 ` fallocate -l 2G example.img ` 创建文件。
8991- ` -nic user,model=virtio ` : 使用用户态网络设备,使用 ` virtio ` 设备模型。
9092
9193这只是创建虚拟机的一个基本示例,QEMU 提供了很多其他选项,可以让你定制网络、图形输出、设备等。
You can’t perform that action at this time.
0 commit comments