New
#1
KVM/QEMU users - creating a Network Bridge
Hi folks
Those of you running a Linux host and wanting to run Windows VM's using KVM/QEMU then provided you've got a wired connection you should make a network bridge otherwise your VM will only be able to use NAT with connection limitations.
VMWare works OK in "Bridged" -- and you can run VMWare and KVM VM's concurrently.
Though on Linux if you want to enable 3D graphics / hardware acceleration properly on VMWare windows VM's manually add this line to the .vmx file :
mks.gl.allowBlacklistedDrivers = "TRUE"
(if you copy the VM to a Windows host then remove that line or it will "error out")
so ensure net-tools and bridge-utils packages are installed. (I've assumed you've already installed KVM and the other bits required -- there's loads of decent info on google so not describing it here. Install also virt-manager if you want a nice GUI for managing virtual machines.
before starting / creating the vm run this type of script :
ifconfig enp3s0f1 0.0.0.0 <== change the enp3s0f1 to your ACTIVE ethernet connection ==>
brctl addbr br0
brctl addif br0 enp3s0f1
dhclient br0
ifconfig
the last ifconfig instruction is to verify bridge is up and has an ip address
now you should have full network access and of course Internet access on your VM.
Here you can see that the bridge (br0) is assigned ip address 192.168.1.16
Now the Windows VM's address is also 192.168.1.16 which is correct and has full connectivity.
(If you only have Wifi -- I haven't yet been able to get a bridge to work (it does on VMWare BTW) - so a get around --USB-->Lan adapter then lan cable into switch and then from switch to wifi extender if you want to avoid long cable runs
I'm working in a shed (what some brits call a "SHOFFICE" -- Shed converted to an office !!! with power heat etc and I'm around 200 metres from main router so this solution works really well -- not running 200 metres of LAN cable through a really freezing garden and hard packed ice in winter !!
Cheers
jimbo
Last edited by jimbo45; 08 Jul 2020 at 03:59.