Windows 10: W10 VM Bridged networking QEMU/KVM (External Switch)

Discus and support W10 VM Bridged networking QEMU/KVM (External Switch) in Windows 10 Virtualization to solve the problem; 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... Discussion in 'Windows 10 Virtualization' started by jimbo45, May 28, 2020.

  1. 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. W10 VM Bridged networking QEMU/KVM (External Switch) [​IMG] Now in the Windows VM set the nic to use shared device -- your bridge br0 W10 VM Bridged networking QEMU/KVM (External Switch) [​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) W10 VM Bridged networking QEMU/KVM (External Switch) [​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, May 28, 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.


    W10 VM Bridged networking QEMU/KVM (External Switch) [​IMG]


    Now in the Windows VM

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


    W10 VM Bridged networking QEMU/KVM (External Switch) [​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)


    W10 VM Bridged networking QEMU/KVM (External Switch) [​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, May 29, 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)


    W10 VM Bridged networking QEMU/KVM (External Switch) [​IMG]


    9) Now your VM has full network access


    W10 VM Bridged networking QEMU/KVM (External Switch) [​IMG]


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


    W10 VM Bridged networking QEMU/KVM (External Switch) [​IMG]


    Job Done "Seeemples" !!!


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


    Cheers

    jimbo
     
    jimbo45, May 29, 2020
    #3
  4. W1zzard Win User

    W10 VM Bridged networking QEMU/KVM (External Switch)

    qemu-kvm

    i'm missing some kind of free gui based management thing for qemu-kvm that lets me do common VM tasks
     
    W1zzard, May 29, 2020
    #4
Thema:

W10 VM Bridged networking QEMU/KVM (External Switch)

Loading...
  1. W10 VM Bridged networking QEMU/KVM (External Switch) - Similar Threads - W10 Bridged networking

  2. 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...
  3. 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 --...
  4. Using Physical Disk in KVM/QEMU Windows VM

    in Windows 10 Virtualization
    Using Physical Disk in KVM/QEMU Windows VM: Hi there If you have a spare external (or even internal) HDD / SSD that you want to use as a "Physical" Disk drive say on a Windows VM using native ntfs for exampleso you can unplug it later and connect to a Windows physical machine etc to copy data etc then it's easy enough...
  5. 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...
  6. W10 VM on W2K19 VM on KVM Host !! nested VM's

    in Windows 10 Virtualization
    W10 VM on W2K19 VM on KVM Host !! nested VM's: Hi folks So far got HYPER-V to run on a Virtual machine creating a lower level W10 VM - The W2K19 machine is itself a VM running on under KVM/QEMU So far only got Gen 1 to work -- with Gen 2 machine starts but no video - will look at that later but here's the Gen 1 VM So...
  7. KVM/QEMU users - creating a Network Bridge

    in Windows 10 Virtualization
    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...
  8. Macrium restore of a QUEMU / KVM W10 VM

    in Windows 10 Virtualization
    Macrium restore of a QUEMU / KVM W10 VM: Hi folks One of the great things with QEMU/KVM VM's is that you can boot from physical devices INSIDE THE VM (and not just ISO's)-- I needed to restore a W10 VM as I'd hosed it up with some silly networking parameter errors etc. With the latest kernels you can Hot plug USB...
  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. KVM Host --W10 VM with HYPER -V running another VM (Nesting)

    in Windows 10 Virtualization
    KVM Host --W10 VM with HYPER -V running another VM (Nesting): Hi there. It seems some CPU's will handle HYPER-V in a VM running on a Host where a HYPERVISOR (KVM in this case) is already running. One needs to make a few mods otherwise booting up the VM running UNDER the HYPER-V (the 2nd level VM) will freeze. I'm currently...