I've installed Ascii in a Qemu VM and qemu dies each and every time I
try to connect to it using SSH via a forwarded port. This crash also
happens each and every time with other Guests, such as CentOS 7, and
with either Ascii or Beowulf as a host. It also happens with known
working Qemu VMs imported from other distros, using much the same
settings. None survive and attempted network connection.
VNC connections work just fine, but when I try to connect to the
forwarded SSH port or forwarded HTTP port, there is a long and VNC locks
up. Nothing shows up in VNC during that interval nor can anything be
typed. Then qemu dies and VNC goes away. The stderr from qemu gets the
single word:
'Killed'
It happens each and every time when trying to connect to the guest from
the host. The crash is the same when trying to connect to either sshd
or Apache2 (or anything else) over a forwarded port.
When I start the guest again I can't find anything on it in
/var/log/syslog or /var/log/messages around the time of the crash.
Here is one example of qemu settings which do not allow incoming
connections. However, there are many other similar variants with
different NICs, drive formats, consoles or VNCs:
qemu-system-x86_64 \
-m size=6G,slots=0,maxmem=6G \
-cpu host \
-enable-kvm \
-device virtio-balloon \
-name "qdevuan",process=qdevuan \
-drive \
format=qcow2,index=0,cache=none,media=disk,file=devuan.img
-cdrom devuan_ascii_2.0.0_amd64_netinst.iso \
-net user,hostfwd=tcp::2222-:22 \
-net user,hostfwd=tcp::8880-:80 \
-net user,hostfwd=tcp::4443-:443 \
-net nic,model=virtio \
-vnc :0 \
-boot c
Again, if I try connecting to SSH on 127.0.0.1 on port 2222, it dies.
If I try HTTP on 127.0.0.1 on port 8880, it dies.
On the host, while Qemu is still running, the host has plenty of free
memory:
$ free -m
total used free shared buff/cache available
Mem: 7898 556 7271 0 70 7175
Swap: 8107 23 8084
However, I can see that memory usage climbs drastically before Qemu is
killed:
. . .
PID PPID USER S %CPU %MEM COMMAND
3409 3408 lars R 42.1 96.4 qdevuan
. . .
What should I be checking to fix or work around this crash?
$ grep -i pretty /etc/os-release
PRETTY_NAME="Devuan GNU/Linux 3 (beowulf)"
$ apt-cache policy qemu-system-x86
qemu-system-x86:
Installed: 1:3.1+dfsg-8~deb10u1
Candidate: 1:3.1+dfsg-8~deb10u1
Version table:
*** 1:3.1+dfsg-8~deb10u1 500
500 http://fi.deb.devuan.org/merged beowulf/main amd64 Packages
100 /var/lib/dpkg/status
I've been puzzling over this for a few weeks.
/Lars