View previous topic :: View next topic |
Author |
Message |
KZQN7737 n00b
Joined: 13 Feb 2024 Posts: 27
|
Posted: Mon Mar 18, 2024 9:26 pm Post subject: Network card replaced by bridging (qemu/kvm) [solved] |
|
|
Greetings.
I'm a newbie to bridging.
I was attempting to make my default network bridge work in virsh/virt-manager (QEMU/KVM/libvirt(d) setup). I was planning to use WiFi in my virtual machines, albeit, I'm not entirely sure it is possible, as for kernel parameters it's ETHERNET bridging and for now I have none ethernet connections.
But I still would've liked to create my guest systems (network is necessary for creation) with WiFi connection and e.g. use the browser in parallel on host.
My initial problem was that there were no devices in:
And
Always showed inactive status of default network, autostart yes, persistent yes.
I couldn't turn it on by using:
Code: |
virsh net-start default
|
Output was something like:
Code: |
error: Unable to start virbr0: No error information
|
Or re-create by using:
Code: |
ip link add virbr0 type bridge
|
I understood that it's about kernel parameters because my system's output to the abovementioned command was something like
Code: |
unknown device type bridge
|
The device disappeared after I enabled the neccessary kernel parameters for bridging from article:
https://wiki.gentoo.org/wiki/Network_bridge#Kernel
Until that moment wlp0s20f3 was showing and worked properly, it was connected to WiFi network on boot by using wpa_supplicant, in /etc/local.d/
After that, my device wlp0s20f3 got replaced by ip_vti0@NONE.
Virtual Tunneling Interface.
I had a similar case of network card wlp0s20f3 not showing in the list of devices in ip addr/ip link/ifconfig because I didn't enable IWLwifi driver as a module.
I recently upgraded my kernel and found the IWLWIFI to suddenly be turned off.
When I compiled the kernel with IWLWIFI module not only with make, but with make modules and make modules_install and rebooted after rebuilding, nothing has changed. I made sure my kernel supports modules and it does.
But running
Shows the device by means of which I used to connect to WiFi network.
Code: |
00:14.3 Network controller: Intel Corporation Comet Lake PCH-lp CNVi WiFi
Subsystem: Intel Corporation Comet Lake PCH-lp CNVi WiFi
|
And no iwlctl driver in use, suddenly.
I noticed the difference that on boot dchpcd now says that:
Code: |
Starting DCHP Client Daemon ...
no valid interfaces found.
|
Why, when I have one, the network card that should've been using iwlwifi?
Has virtual bridging "eaten" the wlp0s20f3 device and replaced it by VTI?
https://man.archlinux.org/man/brctl.8.en says:
Quote: |
network cards can be replaced
|
If so, how exactly does that work?
My .config (just in case it lacks something):
https://dpaste.com/CCFSJUTT7
Fixed .config link -- NeddySeagoon
Last edited by KZQN7737 on Sat Mar 23, 2024 6:16 pm; edited 1 time in total |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3916
|
Posted: Tue Mar 19, 2024 10:21 am Post subject: |
|
|
Normally you can not bridge wifi.
But you can use nat adapters for your VMs.
When using NAT networking with virt-manager you do not need to create any virtual bridge manually. _________________
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54577 Location: 56N 3W
|
Posted: Tue Mar 19, 2024 11:32 am Post subject: |
|
|
KZQN7737,
What alamahant said and some clarifications.
virbr0 is not really a bridge, at least not like you think you want. It is started when libvirtd starts and provides NAT between the host and guests.
Its default IP address is 192.168.122.1.
By default, guests get an IP in the range 192.168.122.0/24 subnet.
Networking outgoing from guests just works, that's the NAT from 192.168.122.1 to the host.
The first question then is is libvirtd runnnig on the host?
If you want to connect to guests from outside of the host, maybe because you run a server in the guest, you either need routing or bridging.
With wifi, you may not have much choice.
I don't understand the problem yet.
If you use virt-manager, which is the GUI version of virt-sh, it will shout at you if it can't connect to libvirtd,
virt-manager only provides a subset of the capability of virt-sh but it will let you fiddle with VMs and networking without all the other distractions that virt-sh provides, so virt-sh is best avoided until you know that there is no other way. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
KZQN7737 n00b
Joined: 13 Feb 2024 Posts: 27
|
Posted: Tue Mar 19, 2024 4:22 pm Post subject: |
|
|
Thanks for clarification that bridging is indeed impossible with WiFi.
NeddySeagoon,
Libvirtd is started on boot:
Code: |
Starting libvirtd . . .
|
Code: |
rc-service libvirtd start
* WARNING: libvirtd has already been started
|
It's there in /etc/init.d:
Code: |
ls /etc/init.d/libvirtd
/etc/init.d/libvirtd
|
The problem is: that my WiFi card got replaced by virtual tunnelling device with no network. I have no ethernet connection and won't be having in a while, only WiFi for now. The question is: it completely impossible to run VMs with Internet access on KVM/QEMU on WiFi? For now I'm able to run my VMs, but without Internet on the whole system, because wlp0s20f3 is not detected by dhcpcd.
How do I make VMs' Internet run with wlp0s20f3 network card working and being displayed in ip addr's output simultaneously?
Instead of DHCP complaining that it has not found the network card on boot.
When previously, before I started working on my system's virtualization .config parameters, all my WiFi was working, dhcpcd was detecting the card on boot and did not complain, and also now IWLWIFI driver is not applied to the same network device.
In livecd wlp0s20f3 is displayed and functions normally.
Perhaps I skipped some .config kernel parameters that affect that? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54577 Location: 56N 3W
|
Posted: Tue Mar 19, 2024 4:55 pm Post subject: |
|
|
KZQN7737,
Code: | CONFIG_IWLWIFI=m
# CONFIG_IWLDVM is not set
# CONFIG_IWLMVM is not set
#
# WARNING: iwlwifi is useless without IWLDVM or IWLMVM |
You only have a part of IWLWIFI in your kernel. You need the other part too.
I don't know which of Code: | # CONFIG_IWLDVM is not set
# CONFIG_IWLMVM is not set | is required for your chipset but choosing both will be harmless.
Your wlp0s20f3 has been disabled by that kernel config. Its not been replaced. That tunnelling device is in addition to, not in place of wlp0s20f3.
Once wlp0s20f3 is back, your VMs will have NAT to the internet. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
KZQN7737 n00b
Joined: 13 Feb 2024 Posts: 27
|
Posted: Sat Mar 23, 2024 6:15 pm Post subject: |
|
|
NeddySeagoon wrote: | KZQN7737,
Code: | CONFIG_IWLWIFI=m
# CONFIG_IWLDVM is not set
# CONFIG_IWLMVM is not set
#
# WARNING: iwlwifi is useless without IWLDVM or IWLMVM |
You only have a part of IWLWIFI in your kernel. You need the other part too.
I don't know which of Code: | # CONFIG_IWLDVM is not set
# CONFIG_IWLMVM is not set | is required for your chipset but choosing both will be harmless.
Your wlp0s20f3 has been disabled by that kernel config. Its not been replaced. That tunnelling device is in addition to, not in place of wlp0s20f3.
Once wlp0s20f3 is back, your VMs will have NAT to the internet. |
Oops. Lol. Thanks! That was my dumb overlook. Marking as solved. |
|
Back to top |
|
|
|
|
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
|
|