Windows 10: KVM/QEMU users - creating a Network Bridge

Discus and support KVM/QEMU users - creating a Network Bridge in Windows 10 Virtualization to solve the problem; 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... Discussion in 'Windows 10 Virtualization' started by jimbo45, Jul 8, 2020.

  1. jimbo45 Win User

    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.

    so ensure net-tools and bridge-utils packages are installed

    before starting / creating the vm run this type of script :

    ifconfig enp3s0f1 0.0.0.0 <========= change the enp3s0f1 to whatever the name is of 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


    KVM/QEMU users - creating a Network Bridge [​IMG]


    Now the Windows VM's address is also 192.168.1.16 which is correct and has full connectivity.


    KVM/QEMU users - creating a Network Bridge [​IMG]


    (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 camma "SHOFFICE" -- Shed converted to an office with power heat etc around 100 metres from main router so this solution works really well -- not running 100 metres of LAN cable through a really freezing garden and hard packed ice in winter !!

    Cheers
    jimbo

    :)
     
    jimbo45, Jul 8, 2020
    #1
  2. jimbo45 Win User

    W10 VM Bridged networking QEMU/KVM (External Switch)

    Hi folks

    Really SIMPLE way of getting Bridged networking to work in QEMU KVM for proper VM access to rest of your LAN -- equivalent to external switch in HYPER-V

    Note you need to do this after re-boot from host each time --you can set a script etc for permanence but as I don't boot the Host very often this works fine.

    1) disable any DHCP from the PHYSICAL NIC i.e set the DHCP to disabled

    2) enter these commands now : assuming eth0 is your physical NIC you are using

    brctl addbr br0
    ifconfig eth0 0.0.0.0
    brctl addif br0 eth0
    dhclient br0

    then hey presto you should see your bridge have an ip address (a real one) and the physical nic not have one.


    KVM/QEMU users - creating a Network Bridge [​IMG]


    Now in the Windows VM

    set the nic to use shared device -- your bridge br0


    KVM/QEMU users - creating a Network Bridge [​IMG]


    it will now have a proper IP address on your LAN and this VM will be accessible to everything on your LAN (it can also access the rest of the LAN too)


    KVM/QEMU users - creating a Network Bridge [​IMG]


    I spent ages with all the quite complex answers on google and invariably ended up with a total mess --usually BOTH the physical NIC and the bridge (br0) having IP addresses so of course internet didn't work on host and VM !!!!!!!

    You need to install dhclient -- ifconfig is also deprecated bit it still is easier for this type of simple command.

    Cheers
    jimbo
     
    jimbo45, Jul 8, 2020
    #2
  3. jimbo45 Win User
    Networking on Windows VM from KVM/ QEMU Host via Bridge

    Hi folks

    For those running Windows VM's on Linux Hosts and want to try the Linux Hypervisor (VMWare and VBOX will run concurrently so you don't even need to power off any running Windows VM's) with decent networking you need to set up a network Bridge (roughly analogous to External Switch in HYPER-V). Otherwise the VM will have access to the Internet only and other parts of your LAN but no host access either way -- either from HOST TO VM or from VM to HOST.

    I've assumed you've already installed basic networking and managed to create a Virtual Machine . (You can create the bridge of course before creating the Virtual Machine to test if it's working properly).

    1) On the HOST install bridge-utils
    2) Create the bridge -- this is done with a simple file in /etc/netctl directory -- my example is kvm-bridge
    3) here's the simplest possible file . If you don't like the basic vi editor (ugh !!!!) you can use a wysisyg full screen editor e.g kate that allows root save to root access only folders.

    Interface=br0
    Connection=bridge
    BindsToInterfaces=(enp2s0f1) ===>to a physical device in your system --
    IP=dhcp

    4) start the bridge : netctl start kvm-bridge

    5) automatically start at Host boot

    netctl enable kvm-bridge

    6) Check via any command if interfaces all working (via ifconfig or any appropriate command). To display the bridge use the command brctl show.

    7) In Samba add these two lines to /etc/samba.conf file

    bind interfaces only = yes
    interfaces = br0 >>>>> Name of your bridge

    If you don't do this on the HOST (only) the host will not have any access to any VM's on the LAN whatever host they are attached to -- even those on different physical machines - it will still be able to access physical machines and the Internet though.

    8) in the VM config for windows (Easy GUI is to use lib-virt - Virtual machine manager) create virtual network --- specify network source -- etc as shown (for Virtio install the win-virtio drivers otherwise a physical nic card will come up - can be used also but virtio is streets ahead for better for Windows)


    KVM/QEMU users - creating a Network Bridge [​IMG]


    9) Now your VM has full network access


    KVM/QEMU users - creating a Network Bridge [​IMG]


    10 ) And from the HOST (Hestur) -- the 2nd VM is a VMWare W10 VM on a different host (wulf) not running KVM.


    KVM/QEMU users - creating a Network Bridge [​IMG]


    Job Done "Seeemples" !!!


    enjoy !!!! ( it's a lot more fun than just starting up VMWare player !!!!!)


    Cheers

    jimbo
     
    jimbo45, Jul 8, 2020
    #3
  4. KVM/QEMU users - creating a Network Bridge

    qemu-kvm

    virt-manager is the gui that can be used to do exactly this.

    from the open source project:QEMU is a generic and open source machine emulator and virtualizer.

    When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance.

    When used as a virtualizer, QEMU achieves near native performances by executing the guest code directly on the host CPU. QEMU supports virtualization when executing under the Xen hypervisor or using the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86, server and embedded PowerPC, and S390 guests.
     
    Easy Rhino, Jul 8, 2020
    #4
Thema:

KVM/QEMU users - creating a Network Bridge

Loading...
  1. KVM/QEMU users - creating a Network Bridge - Similar Threads - KVM QEMU users

  2. MOUSE DOESN'T WORK KVM QEMU WSL2

    in Windows 10 Gaming
    MOUSE DOESN'T WORK KVM QEMU WSL2: I'm virtualizing a FreeBsd 13.0-2 machine on Ubuntu 22.04.2 LTS GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64 under WSL2 the base operating system is Win 11. I use virt-manager and everything runs fine until I try to upload a Window Manager, the mouse doesn't work in any...
  3. MOUSE DOESN'T WORK KVM QEMU WSL2

    in Windows 10 Software and Apps
    MOUSE DOESN'T WORK KVM QEMU WSL2: I'm virtualizing a FreeBsd 13.0-2 machine on Ubuntu 22.04.2 LTS GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64 under WSL2 the base operating system is Win 11. I use virt-manager and everything runs fine until I try to upload a Window Manager, the mouse doesn't work in any...
  4. Creating network bridge creates spanning tree issue

    in Windows 10 Gaming
    Creating network bridge creates spanning tree issue: Earlier this week I added a intel nic to my server and was easily able bridge both the intel and realtek network adapters in windows 10 server 2016 and had no issues. Now as I tried to do the exact same thing on my Desktop running windows 11, I was given a unexpected error...
  5. Creating network bridge creates spanning tree issue

    in Windows 10 Software and Apps
    Creating network bridge creates spanning tree issue: Earlier this week I added a intel nic to my server and was easily able bridge both the intel and realtek network adapters in windows 10 server 2016 and had no issues. Now as I tried to do the exact same thing on my Desktop running windows 11, I was given a unexpected error...
  6. Idiot's guide to creating a Win2GO Windows from KVM/QEMU VM (V2P)

    in Windows 10 Virtualization
    Idiot's guide to creating a Win2GO Windows from KVM/QEMU VM (V2P): Hi there Easy now. Pre-reqs : 1) Bootable version of Macrium Free (use create stand alone recoverable media) on USB and Macrium Free installed in the VM. (It's easier this way). 2) A copy of a running version of Windows\System32\DriverStore from a physical Windows system --...
  7. Windows activation in KVM/qemu virtual machine

    in Windows 10 Updates and Activation
    Windows activation in KVM/qemu virtual machine: Hello, I have a problem with the activation of Win10 Pro. I have a digital license win7 upgrade in 2015 or something like that... I reinstalled my virtual machine with some new tweaks etc. the problem is now that I cannot activate Windows anymore with my Microsoft account...
  8. W10 VM Bridged networking QEMU/KVM (External Switch)

    in Windows 10 Virtualization
    W10 VM Bridged networking QEMU/KVM (External Switch): Hi folks Really SIMPLE way of getting Bridged networking to work in QEMU KVM for proper VM access to rest of your LAN -- equivalent to external switch in HYPER-V Note you need to do this after re-boot from host each time --you can set a script etc for permanence but as I...
  9. Networking on Windows VM from KVM/ QEMU Host via Bridge

    in Windows 10 Virtualization
    Networking on Windows VM from KVM/ QEMU Host via Bridge: Hi folks For those running Windows VM's on Linux Hosts and want to try the Linux Hypervisor (VMWare and VBOX will run concurrently so you don't even need to power off any running Windows VM's) with decent networking you need to set up a network Bridge (roughly analogous to...
  10. Can't create a Network Bridge.

    in Windows 10 Network and Sharing
    Can't create a Network Bridge.: Hello everyone, I have installed Windows 10 Insider Preview Build 14267, and when I go to adapter settings in Network and Sharing Center, I can't make a Network Bridge. I am trying to get Wifi and Ethernet together to get internet on my desktop PC, it doesnt have Wifi. Also...

Users found this page by searching for:

  1. qemu windows bridge network

    ,
  2. qemu bridge windows