cloudbase / cloudbase-init

Cross-platform instance initialization
http://openstack.org
Apache License 2.0
414 stars 150 forks source link

nocloud crashes when setting static ip #84

Open RobVerduijn opened 2 years ago

RobVerduijn commented 2 years ago

Hello,

When using cloudbase-init with a nocloud configuration the service crashes with python errors. Even though the logs clearly show that the meta-data file is read the python script still failed. I'm kinda stuck with the nocloud option because I don't have the luxury of dhcp.

init unattend logs with python error

cloudbase-init-unattend.conf

meta-data

user-data

The Unattend.xml.txt file that I used

Rob

ader1990 commented 2 years ago

Hello,

The NetworkPlugin should not be run in the unattend stage, as it relies on some Windows APIs that are not available at that moment.

You should the dual cloudbase-init run approach that is configured by the MSI installed, where SetHostname is being run in the unattend stage, and all the rest of the plugins are run by cloudbase-init running as a service at every subsequent boot.

Thank you, Adrian Vladu

RobVerduijn commented 2 years ago

Hi,

After setting the config in cloudbase-init the network was set. also added a firstlogon to my Unattend.xml and removed the network services from cloudbase-init-unattend, cause they took forever to timeout

ps. the default cloubase-init(-unattend).conf from the msi still contain deprecated keywords, same goes for the cloudbase-init in the tutorial.

Rob

my config files for those who care: cloudbase-init-unattend.conf cloudbase-init.conf Unattend.xml meta-data user-data