Terraform-provider-libvirt: cloud-init fails with terraform provider libvirt and Ubuntu 18.04

Created on 23 Sep 2019  路  4Comments  路  Source: dmacvicar/terraform-provider-libvirt

System Information

Linux distribution

Ubuntu 18.04 amd64

Terraform version

v0.11.14

Provider and libvirt versions

./terraform-provider-libvirt 0.5.2
Compiled against library: libvirt 4.0.0
Using library: libvirt 4.0.0
Running hypervisor: QEMU 2.11.1
Running against daemon: 4.0.0

Checklist

  • [x] Is your issue/contribution related with enabling some setting/option exposed by libvirt that the plugin does not yet support, or requires changing/extending the provider terraform schema?

No

  • [x] Make sure you explain why this option is important to you, why it should be important to everyone. Describe your use-case with detail and provide examples where possible.

Core functionality

  • [x] If it is a very special case, consider using the _XSLT_ support in the provider to tweak the definition instead of opening an issue

Should not be a special case.

  • [x] Maintainers do not have expertise in every libvirt setting, so please, describe the feature and how it is used. Link to the appropriate documentation

Standard feature

  • [x] Is it a bug or something that does not work as expected? Please make sure you fill the version information below:

I guess, its not a bug. Probably the decoding of the clout-init.file is wrong ?
Need hints to solve the issue.

While deploying a vm with terraform, the following errors occur during cloud-init:

https://pastebin.com/Gi3Yr1PQ

Setup

libvirt.tf: https://pastebin.com/0CqUNSLf
cloud-init.cfg: https://pastebin.com/MFfhYzsG

Steps to Reproduce Issue

Use these config files and try to deploy the vm.


Additional information:

/etc/libvirt/qemu.conf:
...
user = "wartung"
group = "kvm"
security_driver = "none"

/etc/libvirt/libvirtd.conf
...
unix_sock_group = "libvirt"
unix_sock_ro_perms = "0777"
unix_sock_rw_perms = "0770"
auth_unix_ro = "none"
auth_unix_rw = "none"
log_level = 2
log_outputs="2:syslog:libvirtd"

need investigation

Most helpful comment

OMG. Someone has edited the config files with Windows "notepad" and this leaves many special chars at the end of the lines. I am very sorry and will close this ticket now.
Cheers.

All 4 comments

It seems to me more a python cloud init issue. I will need to check

Hi, it seems to be a problem with special chars in the config file. I will post an update, if I have isolated the problem, finally. No need to investigate by your side. Regards.

@will-code-for-pizza thx!

OMG. Someone has edited the config files with Windows "notepad" and this leaves many special chars at the end of the lines. I am very sorry and will close this ticket now.
Cheers.

Was this page helpful?
0 / 5 - 0 ratings