Package: qemu-system-x86
Version: 1:2.8+dfsg-6+deb9u15
Severity: important
X-Debbugs-Cc: debian-lts@lists.debian.org
Hello all!
Quick version:
==============
I recently upgraded the qemu packages on my host from
1:2.8+dfsg-6+deb9u14 to 1:2.8+dfsg-6+deb9u15 , but this breaks user-mode
networking in the guest. This is reproducible; going back to deb9u14 on
the host makes user-mode networking work again in the guest, and going
forward to deb9u15 breaks user-mode networking again in the guest.
Long version:
=============
Host: Debian 9.13, x86_64.
Guest: Debian 10.10, x86_64.
qemu invocation on host:
qemu-system-x86_64 -boot d -m 2048 -hda guest.qcow2 -cdrom /dev/sr0 -device
e1000,netdev=net0 -netdev user,id=net0 -soundhw hda -k en-us -enable-kvm -vga
std -cpu host
Background:
-----------
Two days ago, I had the deb9u14 version on the host. I booted the guest
and user-mode networking worked: the DHCP client in the guest got an
IP address from qemu's built-in DHCP server; I could use a browser in
the guest and access the Internet; I could get files from the host by
using scp from 10.0.2.2 in the guest; I could send files to the host by
using scp to 10.0.2.2 in the guest. Everything was working as expected.
I did not make any configuration changes on the guest before I shut it
down.
Problem:
--------
Earlier today, I checked for updates on the host using aptitude, and was
offered the deb9u15 version of several of the qemu packages I had
installed, namely:
qemu
qemu-block-extra:amd64
qemu-guest-agent
qemu-kvm
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-binfmt
qemu-utils
I accepted the offer and installed all of these. I then started qemu,
using the same invocation on the host.
The guest appeared to come up as normal, and the DHCP client in the
guest got an address from qemu's built-in DHCP server. However, trying
to use lynx in the guest to access the Internet resulted in a message of
"Alert!: Unable to connect to remote host." Trying to use scp in the
guest to transfer files to or from the host at 10.0.2.2 resulted in a
message of "ssh: connect to host 10.0.2.2 port 22: Network is
unreachable".
This is not what I expected. I expected networking to work in the guest
in the same way it did a couple of days ago, before I updated the qemu
packages on the host.
What I tried to diagnose and fix the problem:
---------------------------------------------
I tried using a browser in the host to access the Internet, and that
worked, so I don't think my Internet connection was the problem.
I also tried, on the host, using ssh to connect back to the host and
log in as a different user. That worked, so I don't think the SSH
server on the host was the problem.
I tried shutting down the guest, rebooting the host, and restarting the
guest with the same invocation of qemu - no change. The guest got an IP
address via DHCP but Internet access and host access did not work in
the guest.
I thought maybe the gateway wasn't set up in the guest, so I tried
this command in the guest
ip route add default via 10.0.2.2 dev ens4
and got a message "Error: Nexthop has invalid gateway."
What fixed the problem:
-----------------------
I used snapshot.debian.org to roll back to the 1:2.8+dfsg-6+deb9u14
version of all 15 of the above packages. I then started qemu, using
the same invocation on the host.
The guest came up and user-mode networking worked: the DHCP client in
the guest got an IP address from qemu's built-in DHCP server; I could
use a browser in the guest and access the Internet; I could get files
from the host by using scp from 10.0.2.2 in the guest; I could send
files to the host by using scp to 10.0.2.2 in the guest. Everything
was working as expected.
I have since gone forward to the 1:2.8+dfsg-6+deb9u15 version and
back to the 1:2.8+dfsg-6+deb9u14 version a couple of times and the
problem is repeatable: guest networking works in deb9u14 and doesn't
work in deb9u15.
Things I didn't try:
--------------------
Having some of my qemu packages on the host at the deb9u14 version and
some at the deb9u15 version. I always had all 15 packages at one
version or the other.
More information:
-----------------
Output of routel on the guest in the working condition:
---
target gateway source proto scope dev tbl
default 10.0.2.2 ens4
10.0.2.0 24 10.0.2.15 kernel link ens4
10.0.2.0 broadcast 10.0.2.15 kernel link ens4
local
10.0.2.15 local 10.0.2.15 kernel host ens4
local
10.0.2.255 broadcast 10.0.2.15 kernel link ens4
local
127.0.0.0 broadcast 127.0.0.1 kernel link lo
local
127.0.0.0 8 local 127.0.0.1 kernel host lo
local
127.0.0.1 local 127.0.0.1 kernel host lo
local
127.255.255.255 broadcast 127.0.0.1 kernel link lo
local
fe80:: 64 kernel ens4
fec0:: 64 kernel ens4
default fe80::2 ra ens4
::1 local kernel lo
local
fe80::5054:ff:fe12:3456 local kernel
ens4 local
fec0::5054:ff:fe12:3456 local kernel
ens4 local
---
Output of routel on the guest in the broken condition:
---
target gateway source proto scope dev tbl
10.0.2.15 local 10.0.2.15 kernel host ens4
local
127.0.0.0 broadcast 127.0.0.1 kernel link lo
local
127.0.0.0 8 local 127.0.0.1 kernel host lo
local
127.0.0.1 local 127.0.0.1 kernel host lo
local
127.255.255.255 broadcast 127.0.0.1 kernel link lo
local
fe80:: 64 kernel ens4
fec0:: 64 kernel ens4
default fe80::2 ra ens4
::1 local kernel lo
local
fe80::5054:ff:fe12:3456 local kernel
ens4 local
fec0::5054:ff:fe12:3456 local kernel
ens4 local
---
The difference is that the working condition has four more lines in the
routel output:
---
default 10.0.2.2 ens4
10.0.2.0 24 10.0.2.15 kernel link ens4
10.0.2.0 broadcast 10.0.2.15 kernel link ens4
local
10.0.2.255 broadcast 10.0.2.15 kernel link ens4
local
---
Please let me know if you need more information. Thanks!
Matt Roberds
-- System Information:
Debian Release: 9.13
APT prefers oldoldstable
APT policy: (500, 'oldoldstable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-14-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages qemu-system-x86 depends on:
ii ipxe-qemu 1.0.0+git-20161027.b991c67-1
ii libaio1 0.3.110-3
ii libasound2 1.1.3-5
ii libbluetooth3 5.43-2+deb9u4
ii libbrlapi0.6 5.4-7+deb9u1
ii libc6 2.24-11+deb9u4
ii libcacard0 1:2.5.0-3
ii libfdt1 1.4.2-1
ii libgcc1 1:6.3.0-18+deb9u1
ii libglib2.0-0 2.50.3-2+deb9u2
ii libgnutls30 3.5.8-5+deb9u5
ii libjpeg62-turbo 1:1.5.1-2+deb9u1
ii libncursesw5 6.0+20161126-1+deb9u2
ii libnettle6 3.3-1+b2
ii libnuma1 2.0.11-2.1
ii libpixman-1-0 0.34.0-1
ii libpng16-16 1.6.28-1+deb9u1
ii libpulse0 10.0-1+deb9u1
ii libsasl2-2 2.1.27~101-g0780600+dfsg-3+deb9u1
ii libsdl1.2debian 1.2.15+dfsg1-4
ii libseccomp2 2.3.1-2.1+deb9u1
ii libspice-server1 0.12.8-2.1+deb9u4
ii libtinfo5 6.0+20161126-1+deb9u2
ii libusb-1.0-0 2:1.0.21-1
ii libusbredirparser1 0.7.1-1
ii libvdeplug2 2.3.2+r586-2.1
ii libx11-6 2:1.6.4-3+deb9u4
ii libxen-4.8 4.8.5.final+shim4.10.4-1+deb9u12
ii libxenstore3.0 4.8.5.final+shim4.10.4-1+deb9u12
ii qemu-system-common 1:2.8+dfsg-6+deb9u15
ii seabios 1.10.2-1
ii zlib1g 1:1.2.8.dfsg-5
Versions of packages qemu-system-x86 recommends:
ii qemu-utils 1:2.8+dfsg-6+deb9u15
Versions of packages qemu-system-x86 suggests:
ii kmod 23-2
pn ovmf <none>
ii qemu-block-extra 1:2.8+dfsg-6+deb9u15
ii samba 2:4.5.16+dfsg-1+deb9u4
pn sgabios <none>
pn vde2 <none>
-- no debconf information