cloudbase / windows-imaging-tools

Tools to automate the creation of a Windows image for OpenStack, supporting KVM, Hyper-V, ESXi and more.
Apache License 2.0
677 stars 227 forks source link

Can not apply stage final, no datasource found! Likely bad things to come! cloud-init error #199

Closed laoyin closed 5 years ago

laoyin commented 6 years ago

In the console.log for the instance on the it, I see this error:

*LTS ubuntu tty1 cloud-init[1334]:Can not apply stage final, no datasource found! Likely bad things to come!^M ------------------------------------------------------------^M Traceback (most recent call last):^M File "/usr/lib/python3/dist-packages/cloudint/cmd/main.py/", line 484, in main_modules^M init.fetch(existing= "trust")^M File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 348, in fetch^M return self._get_data_source(existing=existing) File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 258, in _get_data_source^M pkg_list, self.reporter)^M File "/usr/lib/python3/dist-packages/cloudinit/sources/init.py", line 263, in find_source^M raise DataSourceNotFoundException(msg)^M DataSourceNotFoundException: Did not find any data source, searched classes: ()^M

i was going to deploy a maas windows 2012r2 image, commissioning is ok, just deploying , i got this error, if any one help me,i will appreciate it。

maas:2.4 ubuntu18.04 LTS

ader1990 commented 6 years ago

Hello @laoyin ,

This looks like a MAAS configuration issue. do you still encounter this issue?

Thanks.

laoyin commented 6 years ago

thanks a lot,

the issue was already resolved, 1month ago, i used master branch, generated windows server r12 image.

i dont know why the program just stopped in fuction(Wait-ForVMShutdown) everytime. my virtual machine never stop util i manual shut down。

recently, i found another error, windows server IP is not match the maas dhcpd .

and i will check the code.

ader1990 commented 6 years ago

The problem might have been a generation one and one of the causes for the IP issue. Was the image syspreped by the imaging tools?

laoyin commented 6 years ago

ye, when the program stop in Wait-ForVMShutdown, i boot the virtual machine , and set up the cloudbase-init, then shut down it (by manual), so that program can go on. maas can deploy it.

tomorrow i will try the Latest code,see what happen.

laoyin commented 6 years ago

@ader1990 hi, i just checkout the windows curtin hooks, just save the config["network"] in the windows server , did not init windows network.

and the cloudbase-init just deal with maas instace{ local-hostname、instance-id、public-keys、and ssl-x509key }

so that, my windows server's ip is not the maas system allocated。

would you give me some advice, how do i use the cloudbase-init to init the windows server network in its per_networking stage.

like the linux, i lay down the config in /etc/cloud/cloud.cfg.d/ , cloud-init will init the network follow the maas configture.

ader1990 commented 6 years ago

Hello @laoyin ,

for the moment this feature is not yet available in the cloudbase-init master/stable versions and is work in progress. You can checkout this branch (non-production only): https://github.com/ader1990/cloudbase-init/tree/advanced_networking You can also check this ask entry, where you have a download link for the cloudbase-init installer with the feature enabled (same code as the github branch above): https://ask.cloudbase.it/question/2616/deploying-windows-2012-r2-image-with-multiple-nics-via-heat-template/

Or you can use the Launchpad feature tracker to get the patches that you need here: https://blueprints.launchpad.net/cloudbase-init/+spec/json-network-config

Thank you, Adrian Vladu

ader1990 commented 5 years ago

The feature is already available using the latest cloudbase-init version.