[SOLVED] How do I use virtio drivers in Debian in a KVM virtual machine?
It amazes me how often I find the answer to a problem when I'm in the process of thinking through how I can most clearly state a question about it. Such was the case today. I'm posting it anyway since it might help someone else. Here is the question I had prepared to post:
---------------------------------------------------- I installed Debian Linux in a virtual machine under KVM on my Fedora host computer. Now I would like to install the virtio drivers. But the virtio-modules package says, Quote:
---------------------------------------------------- The answer came as I searched for a link that referenced virtio drivers. The link I found says the drivers are (optionally) compiled into the Linux kernel and to just add if=virtio at the appropriate place on the command line. It works! And since Debian uses UUIDs instead of device names, I didn't even have to modify the any grub files. |
I did this in a Ubuntu 22.04 guest, but pretty sure the same instructions are valid for Debian:
i got virtio working by adding the following lines to /etc/initramfs-tools/modules ``` virtio_pci virtio_blk virtio_net ``` then running `sudo update-initramfs -u` then rebooting :) and pretty sure it's running because my disk IO performance almost doubled, the speed of dd if=/dev/zero of=testfile bs=10M iflag=fullblock status=progress went from like 100MB/s to 270MB/s pretty sure the same would work in Debian. I got my info from https://wiki.debian.org/DebianKVMGuests and other places (that link mentions virtio_pci and virtio_blk but not virtio_net for some reason, i got that from somewhere else) also when i run sudo dmesg | grep -i virtio i get: root@test:~# dmesg | grep -i virtio [ 8.079545] scsi host2: Virtio SCSI HBA [ 8.129612] virtio_net virtio2 ens18: renamed from eth0 |
All times are GMT -5. The time now is 02:30 AM. |