virtual-machineyoctoconfigurexen

How do I enable bridged networking in Xen guest?


I am running Xen 4.9 and adding a yocto guest.

I got it to startup with basic config:

name="yoctoguest"
builder="hvm"
kernel="/usr/lib/xen-4.9/boot/hvmloader"
memory=128
disk=[...]

but now I added:

vif=['bridge=xenbr0']
serial='pty'

and get errors:

libxl:error:libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge online [29260] exited with error status 1

also ... script: Could not find bridge device xenbr0

This is my netplan file:

network:
    ethernets:
        enp0s31f5:
            dhcp: false
    version: 2
    bridges:
        xenbr0:
            interfaces: [enp0s31f5]
            dhcp: true

What am I missing in order to enable bridged networking in this guest?


Solution

  • using command:

    netplan generate

    followed by

    netplan apply

    was what I was missing at the time.

    This worked to get the netplan started again - I had not re-generated the netplan config.