Lxd-l2c gives "Error: Failed to disable mount propagation: permission denied"

Hi, I try to use lxd-p2c (v4.0.9) to migrate LXC (v3.0.3) container (with Ubuntu 20.04) to a new server with LXD.

Invoking (as root)

lxd-p2c TARGET_URL TARGET_NAME / --profile SOME_PROFILE

gives me only

Error: Failed to disable mount propagation: permission denied

I can’t google anything about such error. Any ideas what can be cause of this?

Best regards,
Seweryn Niemiec

That suggests the apparmor profile of that source instance is preventing a mount namespace operation required by lxd-p2c.

You could likely temporarily change the profile to unconfined during that transfer with lxc.apparmor.profile=unconfined (actually, 3.0.x may be lxc.aa_profile instead).

Thank you. That would probably solve my problem, but currently I don’t know how to unconfine the container without restarting it (or maybe change its aa mode to complain). Looks like it’s time for me to finally get some knowledge about apparmor :slight_smile: .