xscontainer icon indicating copy to clipboard operation
xscontainer copied to clipboard

Cloud Config for other distro than CoreOS

Open olivierlambert opened this issue 9 years ago • 6 comments

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 avatar Nov 30 '15 23:11 olivierlambert

@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 avatar Dec 01 '15 13:12 olivierlambert

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

olivierlambert avatar Dec 01 '15 15:12 olivierlambert

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.

robertbreker avatar Dec 08 '15 10:12 robertbreker

@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.

olivierlambert avatar Dec 16 '15 17:12 olivierlambert

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

tookit avatar Dec 14 '17 07:12 tookit

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

olivierlambert avatar Dec 14 '17 09:12 olivierlambert