Description of problem:
When running a container inside of a KVM virtual machine, systemd tries to use the same UUID as the KVM virtual machine for the container. This prevents the journals from being linked and prevents the container from starting via the systemd-nspawn@[containername].service
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Build a RHEL 7 root in /var/lib/container/rhel7 using yum --installroot
2. Start the container using: systemd-nspawn -bD /var/lib/container/rhel7
3. The boot sequence will display: "Initializing machine ID from KVM UUID."
4. Stop the container.
5. ln -s /usr/lib/systemd/system/systemd-nspawn\@.service /etc/systemd/system/multi-user.target.wants/systemd-nspawn\@rhel7.service
6. systemctl start systemd-nspawn@rhel7
7. Container will not start. Run journalctl and you'll find this:
systemd-nspawn: Host and machine ids are equal (59515fd022d049bb81418697bd315def): refusing to link journals
systemd-nspawn: Container failed with error code 1.
Container does not start. Errors appear in journald.
Container should start with a UUID that is different than the KVM container and journals should be linked.
Relevant thread from systemd-devel list:
Possible fix from Lennart:
For what it's worth, Fedora 20 runs a *very* similar version of systemd and it does not have this bug:
systemd-208-20.fc20.x86_64 <-- works
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.