Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add support for cloud-init drive as created by libvirt_cloudinit_disk

See original GitHub issue

I would like to use the cloud-init disk generated by I have an ubuntu regular cloud-init example usage at which I’m trying to port to windows.

Essentially, terraform-provider-libvirt creates a iso which is attached as a cd-rom to the VM. The cd-rom label is cidata and the root directory has the following files:

  • meta-data
  • network-config
  • user-data

As displayed by Windows Explorer:


I’ve tried to follow the cloudbase-init codebase and ended up at which checks for the label and some files. Is this the best place to add support for the cloud-init? or is it better to create an entire new metadata service class?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

ader1990commented, Oct 9, 2019

On another topic, you can easily generate custom Windows images using, with support for custom cloudbase-init config files, custom installers and much more.

ader1990commented, Oct 9, 2019

Cloudbase-init works on a plugin based framework. Available plugin docs:

As for the cloud-config example, cloudbase-init supports only setting timezone, hostname and write_file:

Your requirements:

Automatically expand the root disk if there is space available. – plugin available:

Change a user password: available for more advanced services, your options using config drive are limited to creating a cmd/powershell userdata that does that. For this feature there is (again) an older patch that adds cloud-config support, which you can use:

Format and initialize disks: not implemented, but you can fallback to the aforementioned userdata

Set IP configuration: not supported for NoCloudConfigDrive, you need to implement the network metadata parsing, as the plugin exists. For example, the config drive implementation: You need to implement for the NoCloudConfigDrive metadata service the get_network_details or get_network_details _v2 method.

Run commands: localscripts plugin or userdata.

Keep in mind that the userdata can be in MIME format:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cloud-Init Support - Proxmox VE
Add Cloud-Init CD-ROM drive. The next step is to configure a CD-ROM drive, which will be used to pass the Cloud-Init data to...
Read more >
Creating a VM using Libvirt, Cloud Image and Cloud-Init
Create a VM from scratch by allocating a newly created blank disk image to it. Install an OS on the VM, from either...
Read more >
Cloud config examples - cloud-init 22.4.2 documentation
Cloud config examples# · Including users and groups# · Writing out arbitrary files# · Adding a yum repository# · Configure an instances trusted...
Read more >
Cloud-init support for ProxmoxVE · Issue #2938 · rancher/os
PVE allows users to attach the cloud-init data as an IDE, SATA, or SCSI drive. After attaching this drive to the VM, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found