Welcome to Open Carnage

A resource for gamers and technology enthusiasts, with unique means of rewarding content creation and support. Have a wander to see why we're worth the time!

Vaporeon

Lunux networking question

I'm trying to add a wireless device to a network bridge but I'm not exactly sure how to do it. According to the Arch wiki I need to use hostapd but that seems to be for creating an software AP and I'm not sure how it's meant to authenticate with the main access point. The idea is to have a QEMU virtual machine use the bridge to access the outer network. I have been using netctl for network configuration up to this point.

Share this post


Link to post
Share on other sites

Members of Open Carnage never see off-site ads.

The device is a PCIe Atheros AR9287 Wireless Network Adapter.

I need a virtual machine because I use KVM GPU passthrough to run Windows and play games etc. on, It works really well.

My only problem is wifi cards don't seem to work the same as Ethernet.

Share this post


Link to post
Share on other sites
On 9/27/2017 at 1:33 PM, Tucker933 said:

@Solaris should be able to help, but it looks like hes been offline for a few days.

I am still alive, I think...

 

3 hours ago, Vaporeon said:

The device is a PCIe Atheros AR9287 Wireless Network Adapter.

I need a virtual machine because I use KVM GPU passthrough to run Windows and play games etc. on, It works really well.

My only problem is wifi cards don't seem to work the same as Ethernet.

From what it sounds like, you are using systemd so you may or may not be able to still use the wpa_supplicant package. NetworkManager, however, can do all of this. Don't try to bridge connections from NetworkManager or other utilities. In my experience, just using the standard adapter that can be created in virt-manager does enough as it automatically bridges those connections for you. It took me a while to figure this out as well.

 

Aside from your network issue, I've done this project before and it's pretty neat. I'd recommend using a separate HDD for your virtual machine since it will use a lot of HDD/SDD I/O if you're running both the host and guest off the same drive. I don't know what the current situation is with Nvidia, but if you have an Nvidia card, be ready to do a couple hacks to get the driver to install. The last time I tried it with my GTX 970, the driver was being blocked from installation because it uses WMI to probe to see if it's being installed in a virtual environment. It's also worth noting that the information on the Arch Wiki (at least the last time I looked at it) was outdated information. You're better off asking r/VFIO and r/KVM on Reddit on if they've been able to properly install those drivers without those hacks or if someone found an easier way to bypass it.

 

Edit: My GPU passthrough.
 

 

Edited by Solaris
WaeV and Vaporeon like this

Linux/Unix | InfoSec | Electronics | Radios

Share this post


Link to post
Share on other sites

I can still use wpa supplicant, I'm using systemd but netctl is not systemd's own networking thing and they don't conflict.

 

I don't use virt-manager anymore and instead start the VM from a bash script, so I miss out on nice things like it's automatic networking stuff. I do this because I use some newer features that are not yet supported by it and seemed a pain to fudge in. One of these is evdev passthrough, this lets you pass through the keyboard and moue to a virtual device while being able to switch input between the host and guest by pressing both ctrl keys at once.

In regards to the Nvidia driver, yeah there is a newer way. Previously we had to hide the fact that it was running in a VM and this hurt performance as it disabled all the hyper-v extensions, causing lots of stutter for me. The new way is to just spoof the hypervisor ID as it turns out Nvidia look for "KVM" and "Hyper-V" specifically, so if you spoof the ID string to anything else the driver will install and run letting you keep the hyper-v extensions on.

Edited by Vaporeon

Share this post


Link to post
Share on other sites

Just thought I would ask as well, is your wireless adapter USB or a PCI/e card? If it's a USB adapter, you can just add that through virt-manager via USB passthrough.


Linux/Unix | InfoSec | Electronics | Radios

Share this post


Link to post
Share on other sites

PCIe

If I pass it through anyway I lose networking on the host. I need the bridge so I can access samba shares, ssh back into the host from windows etc. This is the reason I don't just use "user" networking in qemu.

Share this post


Link to post
Share on other sites

Ah, your case is a bit different than my own. I was running my host on Ethernet and my guest on a USB adapter I had bought. I've also tried it just using virt-manager through my Ethernet.


Linux/Unix | InfoSec | Electronics | Radios

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.