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.
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.)
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.
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.