0

I am not sure if this is the correct forum for this question but here it goes anyway. I have been running Windows 10 in a VM for a number of months now (it is a requirement for school). I got tired of not being able to easily do things like pass USB devices, not having properly configured Spice settings, etc. I did write a script, but it seemed like the 3 computers I share this VM on (Gentoo, Debian, and openSUSE Tumbleweed) all had different configurations for their QEMU setups, which made my script useless. I just wanted an easier time of things so I decided to migrate everything to virt-manager. Everything works great except for my network. I am on a laptop, so the only way I connect to the Internet is over Wi-Fi. This was no issue in QEMU/KVM from the commandline; the VM shared the connection with the host and everything was great. But virt-manager refuses to allow this. When I select my wireless adapter it is also listed as a macvtap, which brings up a warning saying this won't work properly, and then refuses to do anything else. I read somewhere that it is not possible to share the connection on a wifi card, which does not seem right since, like I mentioned, it worked when I would launch the VM from the command line with QEMU. Is there any way to get virt-manager to work with the wifi adapter in my card? I did get it to work with a USB wifi adapter, but if I forget it at home one more time I'm going to go insane. Any advice or assistance would be appreciated. Even if someone has a good tutorial on how to get spice working or something where I could fix the script (which works) so my VM has the proper screen resolution would count as a win.

Currently running Debian 9 'Stretch' Stable branch

This is the script I made that launches the VM when I do it manually:

WindowsVM.run ->

#!/bin/bash

exec qemu-system-x86_64 -enable-kvm \ -m 2048 \ -vga std \ -usb \ -device usb-host \ -soundhw hda \ -cpu host \ -hda WindowsVM.img \ -cdrom windows-10-pro.iso

1 Answer 1

1

There are many options some with caveats.

  1. In virt-manager create/or start the virtual network interface called "default" a Nat setup that is usually default on most installs. (its Nat so you will have to setup iptables to forward ports). You can make it run on startup so you don't have to start it each time you want to start the vm's.
  2. Use arp proxy(parprouted) between a wireless network and possibly a virtual bridge. Then connect the vm to the "shared device"(bridge).

Try?: Depending on the wireless device you can create multiple interfaces.

iw phy0 interface add vmwlan0 type station

Create a vmwlan0 interface it won't work with many wireless devices however. To see options supported by device use. iw list Then look for supported commands.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .