[ovirt-devel] oVirt Cloud-init

Marc Young 3vilpenguin at gmail.com
Wed Feb 15 22:51:00 UTC 2017


Are there limitations to cloud-init and oVirt? I wouldn't think so,
but i"m having a weird issue.

If i use the cloud-init yaml from the ovirt4 ruby sdk examples (ignore
formatting, gmail is messing with it):

write_files:
- content: |
Hello, world!
path: /tmp/greeting.txt
permissions: '0644'

it works, that file exists, and it shows in the /var/lib/cloud where i'd expect

$ sudo cat /var/lib/cloud/instance/user-data.txt
#cloud-config
output:
  all: '>> /var/log/cloud-init-output.log'
disable_root: 0
runcmd:
- 'sed -i ''/^datasource_list: /d'' /etc/cloud/cloud.cfg; echo
''datasource_list:
  ["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg'
ssh_pwauth: true
chpasswd:
  expire: false
user: root
write_files:
  - content: |
      Hello, world!
    path: /tmp/greeting.txt
    permissions: '0644'


If i use this:

manage-resolv-conf: true
resolv_conf:
  nameservers: ['192.168.2.113']
  searchdomains:
    - blindrage.local
    - bar.example.com

resolv_conf does not get modified. It looks as expected in /var/lib/cloud:

$ sudo cat /var/lib/cloud/instance/user-data.txt
#cloud-config
output:
  all: '>> /var/log/cloud-init-output.log'
disable_root: 0
runcmd:
- 'sed -i ''/^datasource_list: /d'' /etc/cloud/cloud.cfg; echo
''datasource_list:
  ["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg'
ssh_pwauth: true
chpasswd:
  expire: false
user: root
manage-resolv-conf: true
resolv_conf:
  nameservers: ['192.168.2.113']
  searchdomains:
    - foo.local
    - bar.example.com

I also don't see anything in /var/log/cloud-init.log or
/var/log/cloud-init-output.log on  either run even though the
write_files yaml worked.


More information about the Devel mailing list