I've used two lxd containers interconnected via a bridge to verify this.
Each container was a privileged one and had a config as follows
(basically allowed /dev/kvm and /dev/net/tun usage and did not create a
separate user namespace).
name: cq1
profiles:
- default
config:
environment.LC_ALL: en_US.UTF-8
linux.kernel_modules: iptable_nat, ip6table_nat, ebtables, openvswitch, kvm,
kvm_intel
raw.lxc: lxc.cgroup.devices.allow = c 10:232 rwm, lxc.cgroup.devices.allow =
c 10:200
rwm
security.nesting: "true"
security.privileged: "true"
...
devices:
kvm:
path: /dev/kvm
type: unix-char
root:
path: /
type: disk
tun:
path: /dev/net/tun
type: unix-char
ephemeral: false
lxc list | grep cq
| cq1 | RUNNING | 192.168.122.1 (virbr0) | |
PERSISTENT | 0 |
| cq2 | RUNNING | 192.168.122.1 (virbr0) | |
PERSISTENT | 0 |
----
Preparation steps:
root@cq1:~# grep proposed /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ xenial-proposed restricted main
multiverse universe
root@cq1:~# apt-get install
{qemu,qemu-user,qemu-utils,qemu-system,qemu-system-x86,qemu-system-common}/xenial-proposed
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '1:2.5+dfsg-5ubuntu10.8' (Ubuntu:16.04/xenial-proposed
[amd64]) for 'qemu'
Selected version '1:2.5+dfsg-5ubuntu10.8' (Ubuntu:16.04/xenial-proposed
[amd64]) for 'qemu-user'
Selected version '1:2.5+dfsg-5ubuntu10.8' (Ubuntu:16.04/xenial-proposed
[amd64]) for 'qemu-utils'
Selected version '1:2.5+dfsg-5ubuntu10.8' (Ubuntu:16.04/xenial-proposed
[amd64]) for 'qemu-system'
Selected version '1:2.5+dfsg-5ubuntu10.8' (Ubuntu:16.04/xenial-proposed
[amd64]) for 'qemu-system-x86'
Selected version '1:2.5+dfsg-5ubuntu10.8' (Ubuntu:16.04/xenial-proposed
[amd64]) for 'qemu-system-common'
The following additional packages will be installed:
binfmt-support cpu-checker ipxe-qemu libaio1 libasound2 libasound2-data
libasyncns0 libbluetooth3 libboost-iostreams1.58.0 libboost-random1.58.0
libboost-system1.58.0 libboost-thread1.58.0 libbrlapi0.6 libcaca0
libcacard0 libfdt1 libflac8 libiscsi2 libjpeg-turbo8 libjpeg8 libnspr4
libnss3 libnss3-nssdb libogg0 libopus0 libpixman-1-0 libpulse0 librados2
librbd1 libsdl1.2debian libsndfile1 libspice-server1 libusbredirparser1
libvorbis0a libvorbisenc2 libxen-4.6 libxenstore3.0 libyajl2 msr-tools
qemu-block-extra qemu-slof qemu-system-arm qemu-system-mips qemu-system-misc
qemu-system-ppc qemu-system-sparc qemu-user-static seabios sharutils
Suggested packages:
libasound2-plugins alsa-utils opus-tools pulseaudio samba vde2
qemu-block-extra openbios-ppc openhackware sgabios ovmf debootstrap bsd-mailx |
mailx
The following NEW packages will be installed:
binfmt-support cpu-checker ipxe-qemu libaio1 libasound2 libasound2-data
libasyncns0 libbluetooth3 libboost-iostreams1.58.0 libboost-random1.58.0
libboost-system1.58.0 libboost-thread1.58.0 libbrlapi0.6 libcaca0
libcacard0 libfdt1 libflac8 libiscsi2 libjpeg-turbo8 libjpeg8 libnspr4
libnss3 libnss3-nssdb libogg0 libopus0 libpixman-1-0 libpulse0 librados2
librbd1 libsdl1.2debian libsndfile1 libspice-server1 libusbredirparser1
libvorbis0a libvorbisenc2 libxen-4.6 libxenstore3.0 libyajl2 msr-tools qemu
qemu-block-extra qemu-slof qemu-system qemu-system-arm qemu-system-common
qemu-system-mips qemu-system-misc qemu-system-ppc qemu-system-sparc
qemu-system-x86 qemu-user qemu-user-static qemu-utils seabios sharutils
0 upgraded, 55 newly installed, 0 to remove and 2 not upgraded.
Need to get 49.4 MB of archives.
After this operation, 346 MB of additional disk space will be used.
root@cq1:~# dpkg -l qemu qemu-system-x86*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version
Architecture Description
+++-==================================================-==============================-==============================-=========================================================================================================
ii qemu 1:2.5+dfsg-5ubuntu10.8
amd64 fast processor emulator
ii qemu-system-x86 1:2.5+dfsg-5ubuntu10.8
amd64 QEMU full system emulation binaries (x86)
un qemu-system-x86-64 <none>
<none> (no description available)
apt install libvirt-bin virtinst
root@cq1:~# kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
# cloned a container to get the same environment for migration
lxc copy cq1 cq2
Network config:
# cq1
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 192.168.50.223
netmask 24
gateway 192.168.50.1
bridge_ports eth0
bridge_stp off
dns-nameservers 192.168.50.1
root@cq1:~# virsh iface-list
Name State MAC Address
---------------------------------------------------
br0 active 00:16:3e:d7:1c:ae
lo active 00:00:00:00:00:00
root@cq1:~# grep cq /etc/hosts
192.168.50.223 cq1
192.168.50.132 cq2
# cq2
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 192.168.50.132
netmask 24
gateway 192.168.50.1
bridge_ports eth0
bridge_stp off
dns-nameservers 192.168.50.1
root@cq2:~# virsh iface-list
Name State MAC Address
---------------------------------------------------
br0 active 00:16:3e:15:a1:2b
lo active 00:00:00:00:00:00
root@cq2:~# grep cq /etc/hosts
192.168.50.132 cq2
192.168.50.223 cq1
----------------
# create a different host_uuid to avoid conflict during migration - the
# host uuid is taken from bios by default
echo 'host_uuid =' \"`uuidgen --random`\" >> /etc/libvirt/libvirtd.conf
root@cq2:~# systemctl reload libvirt-bin.service
------------
# the resulting net cq1 br0 - eth0 <-> host br0 <-> eth0 - br0 cq2
# we place a tap on the host's br0
# created a diskless vm on cq1 and leave it at the bios stage
# - we do not care as L2 broadcasts will be sent out by qemu regardless
# of the OS availability
root@cq1:~# virt-install --name testvm --ram 512 --vcpus 1 --cpu host
--network model=virtio --disk none --video qxl --channel spicevmc
--graphics spice --boot network,menu=on --noautoconsole --sound
clearxml=yes --pxe
$ sudo tcpdump -e -i br0 rarp
root@cq1:~# virsh list --all
Id Name State
----------------------------------------------------
1 testvm running
root@cq2:~# virsh list --all
Id Name State
----------------------------------------------------
root@cq1:~# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
...
lxc file pull cq1/root/.ssh/id_rsa.pub ./
lxc file push ./id_rsa cq2/root
lxc exec cq2 -- bash -c 'cat /root/id_rsa.pub >> /root/.ssh/authorized_keys'
root@cq1:~# virsh migrate testvm qemu+ssh://cq2/system --live --persistent
# in a separate terminal we get a rarp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br0, link-type EN10MB (Ethernet), capture size 262144 bytes
20:49:27.582789 52:54:00:f5:f0:d2 (oui Unknown) > Broadcast, ethertype Reverse
ARP (0x8035), length 60: Reverse Request who-is 52:54:00:f5:f0:d2 (oui Unknown)
tell 52:54:00:f5:f0:d2 (oui Unknown), length 46
20:49:27.630442 52:54:00:f5:f0:d2 (oui Unknown) > Broadcast, ethertype Reverse
ARP (0x8035), length 60: Reverse Request who-is 52:54:00:f5:f0:d2 (oui Unknown)
tell 52:54:00:f5:f0:d2 (oui Unknown), length 46
20:49:27.780493 52:54:00:f5:f0:d2 (oui Unknown) > Broadcast, ethertype Reverse
ARP (0x8035), length 60: Reverse Request who-is 52:54:00:f5:f0:d2 (oui Unknown)
tell 52:54:00:f5:f0:d2 (oui Unknown), length 46
20:49:28.030433 52:54:00:f5:f0:d2 (oui Unknown) > Broadcast, ethertype Reverse
ARP (0x8035), length 60: Reverse Request who-is 52:54:00:f5:f0:d2 (oui Unknown)
tell 52:54:00:f5:f0:d2 (oui Unknown), length 46
20:49:28.380526 52:54:00:f5:f0:d2 (oui Unknown) > Broadcast, ethertype Reverse
ARP (0x8035), length 60: Reverse Request who-is 52:54:00:f5:f0:d2 (oui Unknown)
tell 52:54:00:f5:f0:d2 (oui Unknown), length 46
-----
So the fix worked as expected and we verified that it is present in
-proposed binary package.
** Tags removed: verification-needed
** Tags added: verification-done
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1656480
Title:
QEMU Does not Send L2 Broadcasts After Live Migration
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1656480/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs