Thanks a lot for the info, Christian. Let me answer your questions firstly: - are your scripts triggered by cloud init NO. - if so in which config module/phase as I'm sure I have done cloud-init driven hostname changed? - OR are your scripts triggered by open-vm-tools directly? VMware Guest OS Customization works with either pure 'perl' scripts or cloud-init as the customization engine. For 'perl' scripts customization, scripts are triggered by open-vm-tools.service, the 'hostnamectl' is the cmd in scripts to set hostname. And 'hostnamectl' has dependency on 'dbus.service'. For 'cloud-init' customization, only 2 config files are copied to a folder by open-vm-tools.service, and then cloud-init-local.service read the config file from that folder to do the customization. This is the reason of "bug 1667831 to have open-vm-tools before cloud-init-local was by Sankar from VMWare". And AFAIK, cloud-init is not using 'hostnamectl' to set hostname for Ubuntu distro. so when do the 'cloud-init' customization on Ubuntu, there is no dependency on 'dbus.service'.
And Yes, I also noticed the cycle dependency was introduced if add 'After=dbus.service' to 'open-vm-tools.service' when cloud-init*.services are also enabled.(https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1796875/comments/8) So the 'after=dbus.service' should only be added when using perl scripts as customization engine. see details in the workaround KB for Ubuntu18.04 Live Server https://kb.vmware.com/s/article/54986 For Set cloud-init as the customization engine: no need add 'after=dbus.service' to open-vm-tools.service For Set perl script as the customization engine: need add 'after=dbus.service' to open-vm-tools.service and also disable or remove cloud-init -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1793715 Title: VMWare Guest OS Customization will fail for Ubuntu 18.04 Server LiveCD To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1793715/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
