0

I have a project using qemu/kvm. I need to make 2 virtual machines (Windows server and Ubuntu server 18), and connect them with physical switch and 2 physical computers (Windows XP). Target is to make a local network.

How do I configure qemu/kvm to connect to physical machines (switch and 2 Windows XP)? what configurations do I need to make for Ubuntu server to join other PCs to the network?

I have already made 2 virtual machines (Windows server and Ubuntu server) and I have two PCs with Windows XP installed and a Cisco switch.

0

The way i would do this is to create install linux bridge first

    apt-get install bridge utils -y 

Then i would tag vlan on the interface and and then add a bridge and enslave that interface to the bridge.

    vconfig add physical_interface vlandID

Then enslaving it to the bridge

    brctl addbr bridge 
    brctl addif bridge interface.vlanid

Then in KVM assign the your VM to the bridge you just created.

On the switches make sure your ports are trunked and you allow the vlans needed to pass through the trunk ports.

0

take a look at the netplan guide how to create and link bridges with guests. That oulines exactly the example you need to have your machines visible on the external network.

At the core that means Step #1: define a bridge:

network:
version: 2
renderer: networkd
ethernets:
    enp3s0:
      dhcp4: no   bridges:
    br0:
      dhcp4: yes
      interfaces:
        - enp3s0

Run netplan apply to make this config active.

Step #2: let libvirt connect the guest to that bridge

<network>
  <name>br0</name>
  <bridge name='br0'/>
  <forward mode="bridge"/>
</network>

This is a network that you then virsh define and can reference from your guests, in the example above the name br0.

2
  • Can you provide importants steps from that link? Please edit to do it – damadam Nov 6 '19 at 8:36
  • @damadam - done – Christian Ehrhardt Nov 12 '19 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.