Thanks for that PrivateNetwork=no hint - works like a charm!

For those that need this, follow the steps below:

1. systemctl edit systemd-hostnamed

   Add the 2 lines below then exit the editor (don't forget to save when
prompted):

   [Service]
   PrivateNetwork=no

2. This will create an override.conf file with the above 2 lines in the
directory:

   /etc/systemd/system/systemd-hostnamed.service.d/

3. The update systemd:

   systemctl daemon-reload

4. Then restart the service:

   systemctl restart systemd-hostnamed


You should now be able to run hostnamectl without it hanging.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1575779

Title:
  hostnamectl fails under lxd unpriv container

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1575779/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to