Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eroussy opened this issue Feb 12, 2024 · 0 comments
Open

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

eroussy opened this issue Feb 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@eroussy
Copy link
Member

eroussy commented Feb 12, 2024

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
@dupremathieu dupremathieu added the bug Something isn't working label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants