LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-19-2012, 01:08 PM   #1
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora and others
Posts: 757

Rep: Reputation: 145Reputation: 145
[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:
Warning: This package is intended for the use in building debian-installer images only. Do not install it on a normal Debian system.
Oh? So how do I get virtio drivers in my normal Debian system running in a VM?
----------------------------------------------------

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.
 
Old 07-05-2022, 07:50 AM   #2
hanshenrik
LQ Newbie
 
Registered: Jul 2022
Posts: 1

Rep: Reputation: 0
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

Last edited by hanshenrik; 07-05-2022 at 07:53 AM.
 
  


Reply

Tags
kvm, virtio


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
connecting to kvm virtual machine sanaz Linux - Virtualization and Cloud 1 10-06-2012 10:02 AM
Can KVM access a Hyper-V virtual machine directly Nick_C Linux - Virtualization and Cloud 4 03-05-2012 10:12 AM
Configuring Slackware 13.7 as guest on KVM with virtio drivers baboow Linux - Virtualization and Cloud 3 08-30-2011 10:43 AM
LXer: Set up RH VirtIO SCSI driver on Windows XP KVM at KVM-QEMU Instance on F14 LXer Syndicated Linux News 14 01-09-2011 12:21 PM
KVM Virtual Machine CD CHANGE ashishverma1984 Fedora 2 12-12-2008 02:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration