seapath / meta-seapath

This is the core of the seapath project. The meta-seapath repo contains the yocto Seapath layer, which contains all the code (yocto recipes) needed to build the seapath images used to install seapath (host, guest, flasher, etc.)
https://lfenergy.org/projects/seapath/
Apache License 2.0
6 stars 10 forks source link

Unable to access VM when using a linux bridge on hypervisor. #172

Open eroussy opened 9 months ago

eroussy commented 9 months ago

Describe the bug I use a standard linux bridge inside the hypervisor to access both hypervisor and VMs. The hypervisor is reachable but the VM is not.

To Reproduce Steps to reproduce the behavior:

  1. Deploy SEAPATH Yocto on a standalone machine with a bridge (see inventory below)
  2. Launch a virtual machine connected to that bridge (see inventory below)
  3. Log into the virtual machine with virsh console guest0
  4. Add an IP addr to this machine : sudo ip addr add <vm_ip_addr> dev enp0s2
  5. Try to connect to the vm ssh admin@<vm_ip_addr>
  6. The connection fails

Expected behavior When the bridge is set up and the VM has an IP address, we should be able to connect with ssh.

Workaround Use an ovs bridge instead.

Ideas to fix We must first test if the new version of the linux kernel and RT patch corrects the problem. If yes, we must ensure that we still have good RT performances in this version

Standalone Host inventory


---
all:
  children:
    standalone_machine:
      children:
        hypervisors:
          hosts:
            machine:
              ansible_host: 192.168.217.19
              ip_addr: "{{ ansible_host }}"
              network_interface: enp3s0f0
              gateway_addr: 192.168.217.1
              ntp_servers: 192.168.217.1
              kernel_parameters_restart: true
              create_br0_bridge: true  # This will automatically create the br0 bridge on hypervisor
  vars:
    ansible_connection: ssh
    ansible_user: admin
    ansible_python_interpreter: /usr/bin/python3
    apply_network_config: true
    ansible_remote_tmp: /tmp/.ansible/tmp
    ansible_become: true
    ansible_become_method: sudo
    ansible_become_flags: "-n -E"
    ansible_ssh_common_args: '-o StrictHostKeyChecking=no'

VM inventory

all:
  children:
    VMs:
      hosts:
        guest0:
          ansible_host: 192.168.213.130
          vm_template: "../templates/vm/guest.xml.j2"
          vm_disk: "../vm_images/guest.qcow2"
          vm_features: []
          local_disk:
              - disk_file: guest0.qcow2
          bridges:
            - name: "br0"
              mac_address: "52:54:00:c4:ff:02"
      vars:
        ansible_user: ansible
        apply_network_config: true