anchor.diff:        machine.succeed("machinectl start ${containerName}");
         machine.wait_until_succeeds("systemctl -M ${containerName} is-active default.target");
   
  +      # Test nss_mymachines without nscd
  +      machine.succeed('LD_LIBRARY_PATH="/run/current-system/sw/lib" getent -s hosts:mymachines hosts ${containerName}');
  +
  +      # Test failing nss_mymachines via nscd
  +      # nscd has not enough rights to connect to systemd bus
  +      # via sd_bus_open_system() in
  +      # https://github.com/systemd/systemd/blob/main/src/nss-mymachines/nss-mymachines.c#L287
  +      machine.fail("getent hosts ${containerName}");
  +
         # Test systemd-nspawn network configuration
  -      machine.succeed("ping -n -c 1 ${containerName}");
  +      machine.succeed("systemctl stop nscd");
  +      machine.succeed('LD_LIBRARY_PATH="/run/current-system/sw/lib" ping -n -c 1 ${containerName}');
  +      machine.succeed("systemctl start nscd");
   
         # Test systemd-nspawn uses a user namespace
         machine.succeed("test $(machinectl status ${containerName} | grep 'UID Shift: ' | wc -l) = 1")
  
positive.code:       networking.useNetworkd = true;
        networking.useDHCP = false;
  
        # open DHCP server on interface to container
        networking.firewall.trustedInterfaces = [ "ve-+" ];
  
        # do not try to access cache.nixos.org
        nix.settings.substituters = lib.mkForce [ ];
  
        virtualisation.additionalPaths = [ containerSystem ];
      };
  
negative.code:       machine.succeed("machinectl reboot ${containerName}");
        machine.wait_until_succeeds("systemctl -M ${containerName} is-active default.target");
  
        # Restart machine
        machine.shutdown()
        machine.start()
        machine.wait_for_unit("default.target");
  
        # Test auto-start
        machine.succeed("machinectl show ${containerName}")
  
        # Test machinectl stop
        machine.succeed("machinectl stop ${containerName}");
        machine.wait_until_succeeds("test $(systemctl is-active systemd-nspawn@${containerName}) = inactive");
  