New
#1
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)
9) Now your VM has full network access
10 ) And from the HOST (Hestur) -- the 2nd VM is a VMWare W10 VM on a different host (wulf) not running KVM.
Job Done "Seeemples" !!!
enjoy !!!! ( it's a lot more fun than just starting up VMWare player !!!!!)
Cheers
jimbo
Last edited by jimbo45; 06 Jan 2020 at 08:33. Reason: Added Network Map from HOST as well