I'm working on Xen hypervisor on Xubuntu 22.04. I have the trouble to configure the network between host and guest OS. Technically, ping can't reach each other.
Host: Xubuntu 22.04 Guest: Alpine Linux 3.17.1
Guest was created and installed by 'xl create -f ', in which has "vif = [ 'bridge=xenbr0' ]" parameter.
Here's the logs from Host and Guest side.
Host side:
$ ip a
...
3: xenbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 66:92:37:79:3d:28 brd ff:ff:ff:ff:ff:ff
inet 192.168.14.100/24 scope global xenbr0
valid_lft forever preferred_lft forever
inet6 fe80::6492:37ff:fe79:3d28/64 scope link
valid_lft forever preferred_lft forever
5: vif3.0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master xenbr0 state UP group default qlen 32
link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
inet 192.168.14.1/24 scope global vif3.0
valid_lft forever preferred_lft forever
$ sudo xl network-list 3
Idx BE Mac Addr. handle state evt-ch tx-/rx-ring-ref BE-path
0 0 00:16:3e:79:a4:ce 0 4 -1 -1/-1 /local/domain/0/backend/vif/3/0
$ brctl show
bridge name bridge id STP enabled interfaces
xenbr0 8000.669237793d28 no vif3.0
Guest side:
localhost:/etc/network# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 00:16:3e:79:a4:ce brd ff:ff:ff:ff:ff:ff
inet 192.168.14.2/24 brd 192.168.14.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::216:3eff:fe79:a4ce/64 scope link
valid_lft forever preferred_lft forever
Please let me know if any other information is needed. Thanks.
The
-1values in thexloutput look suspicious. Are the event channel (xen-evtchn) and grant table (xen-gntdev) kernel modules loaded in the dom0? I would expect an error from libxl in case these interfaces are missing, since they are not really optional in the ordinary Xen environment.