-
-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intent to contribute: ISO generation for cloud-init disks #1389
Comments
Hi @ZauberNerd! 👋🏼 That's an interesting idea! While I'm not opposed to this approach, it won't solve the main problem you're aiming at: eliminating SSH access. We still need SSH to run the custom import command for VM disks, as the PVE API does not allow importing, for example, a qcow2 image stored in the iso storage using Would you mind sketching an example of a VM resource using this new approach, so we can discuss the details? I'm also about to start experimenting with the implementation of the initialization section for the new VM2 resource. It would be nice to flesh out some design points around cloud-init. |
Yes, unfortunately it doesn't solve other file upload issues. As far as I understand, only My idea was to specifically target the cloud-init generation:
This would allow to at least eliminate SSH access for a common use case of provisioning cloud-init based VMs. |
Hey @ZauberNerd !
Yes, and there will be a possibility of having two conflicting cloud-init configs, one from the custom build iso file you're proposing, and another that comes from the I would prefer to have the new "cloud-init-iso" configuration wrapped up in the I'm thinking about a structure like: initailization {
datastore_id = ...
interface = ...
# all other existing attributes
# but if present alongside the `iso` then provider will throw an error
iso {
meta_data = <<-EOT
...
EOT
user_data = ....
vendor_data = ....
...
} WDYT? |
@bpg I like it. But do we then still need the |
Yes, we can define constraints on the attribute to make them mutually exclusive. Actually that's what I meant by "throw an error". Provider could do the schema validation when parsing a config, and flag attributes that overwrite each other. |
There is also a good thread with lots of details about cloud-init behaviour in different cases. |
Is your feature request related to a problem? Please describe.
The
proxmox_virtual_environment_file
resource requires SSH access to the node when creating and uploading a cloud-init snippet.Describe the solution you'd like
I would like to reduce usage of SSH for provisioning resources, thus I propose to use the https://github.com/kdomanski/iso9660 library to create an ISO image on the fly (basically what's happening here: https://github.com/Telmate/terraform-provider-proxmox/blob/186ec3f23bf4a62fcad35f6292fa1350b8e1183b/proxmox/resource_cloud_init_disk.go#L77-L122)
Describe alternatives you've considered
The information:
On the
proxmox_virtual_environment_file
docs is good advice for downloading OS installer ISOs directly onto the node, but for cloud-init disks you usually would want to create them locally from a yaml file or inline specification.Additional context
I'm happy to create a pull request for this feature, if desirable.
The text was updated successfully, but these errors were encountered: