qemu: Tell how to build guest kernel with Virtio

This commit is contained in:
Xi Ruoyao 2023-02-27 15:32:06 +08:00
parent f1f151995f
commit 8cffdfa121
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3

View File

@ -478,9 +478,14 @@ qemu-img create -f qcow2 $VDISK_FILENAME $VDISK_SIZE</userinput></screen>
instead of simulating a real disk hardware. This can improve disk I/O
performance, but it requires a Virtio driver in guest kernel. Use
it instead of a plain <option>-drive</option> if the guest kernel
supports Virtio. Note that if the guest kernel is Linux, the virtual
disks using Virtio interface will be named <filename>vdx</filename>
in the devtmpfs, instead of <filename>sdx</filename>.
supports Virtio. To build a Linux kernel with Virtio support for the
guest, use
<command>make defconfig &amp;&amp; make kvm_guest.config</command> to
create an initial kernel configuration with the Virtio drives enabled,
then make your customization. And, if the guest kernel is Linux, the
virtual disks using Virtio interface will be named
<filename>vdx</filename> in the devtmpfs, instead of
<filename>sdx</filename>.
</para>
<para>