Hi, I am using Fedora 34 and wanted to use a VM on it. It is QEMU KVM. My VM is also Fedora 34.
It all worked well but instead of the WiFi settings on the top right, it only shows wired connections which is unusual.
As I searched for WiFi settings, it said I need a WiFi adapter in order to use WiFi. Why is that? Because on my normal OS which I’m controlling the VM from it works perfectly.
I am not very familiar with the tech but I have read I have to use a NAT connection (?). Is that correct? If yes, is it secure? I want to use the VM for more privacy and security. The IP address should not be the same, I want another identity in the VM. However, a WiFi connection would be neat.
Guest network is typically provided with a virtual switch operating in NAT mode:
libvirt: Virtual Networking
So, you don’t really need to access physical wireless adapters from the guest.
Just set up the wireless connection on the host and guests should be able to use it.
Thank you, but I couldn’t even enable WiFi on the VM because it says I need a WiFi adapter.
In normal default configuration, the wifi adaptor is controlled by the host - the guests got virtual network adaptors (LAN) in NAT mode. The guests will not aware there is wifi adaptor in your host.
My hosts have a LAN port and a wifi adaptor. I can use PCI passthrough to assigned my wifi adaptor to my guest (only one), then that guest will can there is a wifi adaptor. (Once assigned, the hosts will not see the wifi adaptor any more.)
Just to add on to what the others are saying.
On your host machine, the one running qemu, you make a connection to your wireless network.
Since the host machine is using wifi network adapter, the guest machine will be given a virtual lan adapter which is using the wifi adapter on the host.
That is the way it normally works.
However, if you have some special purpose application where you are wanting to have the VM have direct access to the wifi adapter, you can do that by setting it up for PCI passthrough. However, that will block the host from having access to wifi which is why most people wouldn’t configure it this way.
Makes sense, thanks. Can you tell me how I can manage that with the virtual LAN adapter in the VM?
Are you using virt-manager?
Yes. I have found out the reason I think but this leads to another problem. Can you quickly check out my newest question?
Guest NIC settings in virt-manager:
- Network source: Bridge device…
- Device name:
- Device model:
Oh thank you, but I actually want to use NAT as it seems to be more fitting to my needs regarding privacy and security.
virbr0 is the default virtual network/switch operating in NAT mode.
But how am I using NAT when i switch from NAT to Bridge? I don’t really understand that.
The guest NIC is bridged to the virtual switch that operates in NAT mode.
I did that, but it still shows “No network adapter found”.
(If it is the right approach to go to WiFi settings in the VM).
No, and it doesn’t seem like a good idea to pass the wireless adapter to the guest.
There’s neither privacy nor security benefit, so you’d better reconsider.
I understand, thank you for your advice. I basically want to have WiFi on my VM with as much privacy and security as possible. Can you advise me anything?
again, your host connects to wifi, and provides a virtual, wired network connection to the guest(s). All traffic is routed through the host. That network connection can be configured. You don’t want your VM access the physical wifi adapter.
Thank you two guys. Would you also recommend the Red Hat guide Vladislav sent me as a solution to use WiFi on my VM with high security and privacy?
Don’t know, you haven’t told us why you want this setup and not use the default…