Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Install Virtio network device
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
rovell74
n00b
n00b


Joined: 05 Apr 2020
Posts: 23

PostPosted: Sat Apr 11, 2020 5:14 pm    Post subject: Install Virtio network device Reply with quote

Hi

how i enable support for Virtio network device

Thanks
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 2117
Location: Frankfurt, Germany

PostPosted: Sat Apr 11, 2020 5:33 pm    Post subject: Reply with quote

In the kernel? CONFIG_VHOST_NET in the host kernel and CONFIG_VIRTIO_NET in the guest kernel.
Back to top
View user's profile Send private message
rovell74
n00b
n00b


Joined: 05 Apr 2020
Posts: 23

PostPosted: Sat Apr 11, 2020 5:53 pm    Post subject: Reply with quote

To compile the kernel i do

make menuconfig

and enable "Kernel-based Virtual Machine (KVM) support"

Is it right?

Thanks
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15294

PostPosted: Sat Apr 11, 2020 6:17 pm    Post subject: Reply with quote

No. That is the top-level option for the host kernel to be able to run hardware-assisted virtual machines. You can have a kernel that has that enabled, without having any virtio support. Enable the options that mike155 suggested. You can find them using the menuconfig search feature (bound to /).
Back to top
View user's profile Send private message
rovell74
n00b
n00b


Joined: 05 Apr 2020
Posts: 23

PostPosted: Sun Apr 12, 2020 9:12 am    Post subject: Reply with quote

I enable CONFIG_VHOST_NET and CONFIG_VIRTIO_NET in kernel

I do

make && make modules_install

and

make install

But when i reboot the machine don't see eth0.

If i run ifconfig -a i see lo and sit0.

If i launch lspci -k i get

Ehternet controller: Red Hat, Inc. Virtio network device

What i've to do to enable eth0?

Thanks
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15294

PostPosted: Sun Apr 12, 2020 4:36 pm    Post subject: Reply with quote

In which kernel did you make those changes? Mike155 told you to make one change in the host kernel and the other change in the guest kernel. In the guest, what is the output of zgrep VIRT /proc/config.gz?
Back to top
View user's profile Send private message
rovell74
n00b
n00b


Joined: 05 Apr 2020
Posts: 23

PostPosted: Sun Apr 12, 2020 4:45 pm    Post subject: Reply with quote

Hi i the command zgrep VIRT /proc/config.gz return

CONFIG_VIRTUALIZATION=y
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_VIRT_TO_BUS=y
CONFIG_DMA_VIRTUAL_CHANNELS=y
CONFIG_VIRTIO_MENU=y
CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y

I 've done all the changes in the host kernel. My gentoo is a virtual machine on Parallels MAC OSx.

When I boot gentoo during installation I see eth0.
Back to top
View user's profile Send private message
ununu
n00b
n00b


Joined: 19 Apr 2020
Posts: 29

PostPosted: Mon May 11, 2020 4:45 pm    Post subject: Reply with quote

rovell74 wrote:
When I boot gentoo during installation I see eth0.


You're missing a lot of virtio devices, those are spread out all over config.

virtio-net:

Device Drivers ->

Module is:

CONFIG_VIRTIO_NET

To get a glimpse of what gentoo live loads run the same comand on the liveCD:

Code:
zgrep VIRT /proc/config.gz
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum