--- a/coverage.sh
+++ b/coverage.sh
@@ -38,6 +38,7 @@ rm -f shared/cover_db.img
 : "${HAVE_QEMU:=yes}"
 : "${RUN_MA_SAME_TESTS:=yes}"
 : "${ONLINE:=no}"
+: "${CONTAINER:=no}"
 
 HOSTARCH=$(dpkg --print-architecture)
 
@@ -530,8 +531,13 @@ if [ "\$ret" = 0 ]; then
 	echo expected failure but got exit \$ret >&2
 	exit 1
 fi
+rm -r /tmp/debian-chroot
 END
-if [ "$HAVE_QEMU" = "yes" ]; then
+if [ "$CONTAINER" = "lxc" ]; then
+	# see https://stackoverflow.com/questions/65748254/
+	echo "cannot run under lxc -- Skipping test..." >&2
+	skipped=$((skipped+1))
+elif [ "$HAVE_QEMU" = "yes" ]; then
 	./run_qemu.sh
 	runtests=$((runtests+1))
 else
@@ -557,6 +563,7 @@ if [ "\$ret" = 0 ]; then
 	echo expected failure but got exit \$ret >&2
 	exit 1
 fi
+rm -r /tmp/debian-chroot
 END
 if [ "$HAVE_QEMU" = "yes" ]; then
 	./run_qemu.sh
