Skip to content

Commit a5d6714

Browse files
tests/lib/nested.sh: remove netplan apparmor profile in the host
as it prevents access to ports exposed by qemu.
1 parent bb8a9d7 commit a5d6714

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/lib/nested.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,6 +1266,13 @@ nested_create_vm_service() {
12661266
PARAM_OPT="${2:-}"
12671267
QEMU=$(nested_qemu_name)
12681268

1269+
# On UC 26.04, the netcat apparmor profile is not allowing access to the
1270+
# ports exposed by qemu, remove it.
1271+
if os.query is-ubuntu-ge 26.04; then
1272+
apparmor_parser -R /etc/apparmor.d/nc.openbsd
1273+
fi
1274+
apparmor_parser -R /etc/apparmor.d/nc.openbsd || true
1275+
12691276
# Now qemu parameters are defined
12701277

12711278
# use only 2G of RAM for qemu-nested

0 commit comments

Comments
 (0)