DataSourceNotFoundException - cloud-init fails for cloud-images VHD image with nova-hyperv as compute

Bug #1634524 reported by Larry Michel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-images
Invalid
Undecided
Unassigned
cloud-init
Invalid
Undecided
Unassigned

Bug Description

I tried using the VHD image from the https://cloud-images.ubuntu.com/releases/trusty/release/ with the nova-hyperv charm deployed for compute, and cloud-init fails:

In the console.log for the instance on the nova-hyperv unit, I see this error:

 * Stopping System V runlevel compatibility^[[74G[ OK ]^M^M
Can not apply stage final, no datasource found! Likely bad things to come!^M
------------------------------------------------------------^M
Traceback (most recent call last):^M
  File "/usr/bin/cloud-init", line 318, in main_modules^M
    init.fetch()^M
  File "/usr/lib/python2.7/dist-packages/cloudinit/stages.py", line 308, in fetch^M
    return self._get_data_source()^M
  File "/usr/lib/python2.7/dist-packages/cloudinit/stages.py", line 236, in _get_data_source^M
    pkg_list)^M
  File "/usr/lib/python2.7/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
------------------------------------------------------------^M
^M^M

This was recreated by Cloudbase, and this was their observation:

"So apparently the trusty VHD image from cloud-images (https://cloud-images.ubuntu.com/releases/trusty/release/) does not have cloud-init configured for OpenStack.
Wondering if that’s on purpose because the cloud image description says "HyperV images for use with Microsoft Azure or SCVMM".

So I ended up converting the Qcow2 trusty cloud image (which I knew it is working with OpenStack) into VHDx:

qemu-img convert -f qcow2 -O vhdx trusty-server-cloudimg-amd64-disk1.img trusty-server-cloudimg-amd64-disk1.vhdx

And upload it into glance:

      glance image-create –name trusty-hyperv --file ./trusty-server-cloudimg-amd64-disk1.vhdx --disk-format vhd --container-format bare –progress

And then boot a VM and everything went fine. I was able to ping/SSH the VM."

Tags: oil
Revision history for this message
Larry Michel (lmic) wrote :

It also worked for me when I tried the qemu-img converson.

Revision history for this message
Dan Watkins (oddbloke) wrote :

Hi Larry,

Thanks for filing this bug. That image is indeed only intended to work in Azure environments, so I'm going to mark this bug as Invalid.

Thanks!

Changed in cloud-images:
status: New → Invalid
Changed in cloud-init:
status: New → Invalid
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.