From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Date: Tue, 18 Jul 2017 17:21:09 +0800
Subject: remove-etc-machineid

---
 share/hooks/004-remove-dbus-machine-id.chroot | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/share/hooks/004-remove-dbus-machine-id.chroot b/share/hooks/004-remove-dbus-machine-id.chroot
index 230099e..6beac3b 100755
--- a/share/hooks/004-remove-dbus-machine-id.chroot
+++ b/share/hooks/004-remove-dbus-machine-id.chroot
@@ -7,3 +7,6 @@ set -e
 # This removes dbus machine id that cache that makes each system unique.
 
 rm -f /var/lib/dbus/machine-id
+
+# truncate, do not remove otherwise systemd is unhappy
+printf "" > /etc/machine-id
