xenserver / xscontainer

Support for Docker and Container Management
BSD 2-Clause "Simplified" License
25 stars 15 forks source link

Cloud Config for other distro than CoreOS #22

Open olivierlambert opened 8 years ago

olivierlambert commented 8 years ago

Hi,

Seems using the plugin to interact with cloudinit enabled templates is not working (tested in Ubuntu and Debian).

The disk is detected, but then it complains about openstack/latest/meta_data.json missing. By creating the file with the following stuff inside, it works:

{
    "uuid": "83679162-1378-4288-a2d4-70e13ec132aa"
}

I'm no expert in cloundinit/OpenStack cloud drive config, so I can't tell if it's really standard to use this file. All I can say, it's not created by the XS plugin, thus it can't work.

olivierlambert commented 8 years ago

@robertbreker The CloudInit doc said that meta_data.json is mandatory, see https://cloudinit.readthedocs.org/en/latest/topics/datasources.html?highlight=openstack#version-2

openstack/
  - 2012-08-10/ or latest/
    - meta_data.json
    - user_data (not mandatory)
  - content/
    - 0000 (referenced content files)
    - 0001
    - ....
ec2
  - latest/
    - meta-data.json (not mandatory)
olivierlambert commented 8 years ago

Well, it seems that CoreOS uses it's own cloudinit implementation. It explains the differences and why it doesn't work for other OS.

robertbreker commented 8 years ago

Thanks Olivier - I think your diagnosis is spot on; The current function call is tailor-cut to CoreOS. We should be looking at expanding it.

olivierlambert commented 8 years ago

@robertbreker : we did it ourselves (a generic cloud config drive support), see https://xen-orchestra.com/blog/cloudinit-support-for-xenserver/

Under the hood, we are using import_raw_vdi to push it to a small config drive, thus avoiding any plugin installation on XS.

tookit commented 6 years ago

How to put content to the config drive with `import_raw_vdi'? @olivierlambert

olivierlambert commented 6 years ago

Check in the Xen Orchestra source code :) It's very likely to be in xo-server repo.