+
+# systemd-networkd
+# https://wiki.archlinux.org/title/systemd-networkd
+# https://www.linuxtricks.fr/wiki/systemd-le-reseau-avec-systemd-networkd
+function write_guest_systemd_natip () {
+ cat << EOF
+[Match]
+Name=eth0
+
+[Network]
+DHCP=ipv4
+EOF
+}
+
+function write_guest_systemd_publicip () {
+ cat << EOF
+[Match]
+Name=eth0
+
+[Network]
+Address=${GUEST_IP}/${MASKLEN}
+Gateway=$GATEWAY
+EOF
+}
+
+function uuid() {
+ python -c "import uuid; print(uuid.uuid1())"
+}
+# xxx this seems to be no longer needed ?
+function write_guest_networkmanager_natip() {
+ cat << EOF
+EOF
+}
+function write_guest_networkmanager_publicip() {
+ cat << EOF
+[connection]
+id=Wired connection 1
+uuid=$(uuid)
+type=ethernet
+autoconnect-priority=-999
+# setting this seems to be counter-productive
+# interface-name=${VIF_GUEST}
+
+[ipv4]
+address1=${GUEST_IP}/${MASKLEN},${GATEWAY}
+#dhcp-hostname=${GUEST_HOSTNAME}
+method=manual
+EOF
+}
+