mirror of
https://github.com/luthermonson/go-proxmox.git
synced 2026-04-26 09:25:53 +03:00
[GH-ISSUE #119] Define iso storage on CloudInit #24
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-proxmox#24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SnelsSM on GitHub (Feb 25, 2024).
Original GitHub issue: https://github.com/luthermonson/go-proxmox/issues/119
Hi!
How to define storage for CloudInit function?
I'm trying to use context.WithValue something like
but without success.
What am I doing wrong?
@luthermonson commented on GitHub (Feb 25, 2024):
the cloud init func takes care of this for you: https://github.com/luthermonson/go-proxmox/blob/main/virtual_machine.go#L143-L146
@luthermonson commented on GitHub (Feb 25, 2024):
i guess im also confused as to what youre trying to even do, are you naming your iso storage "templates" some how? there is no support for any storage types besides
iso,vztmpl,backup,rootdir,imagesand proxmox wants ISOs in the iso storage so the cloudinit func puts them there.@SnelsSM commented on GitHub (Feb 25, 2024):
@luthermonson
I have several storages that store ISOs. But for cloud-init ISOs, I want to define a storage with a specific name. In my case, this storage is called "templates". But the CloudInit function saves the ISOs in random storage.
@luthermonson commented on GitHub (Feb 25, 2024):
can you show me the contents of
pvesh get /nodes/{node}/storage? make sure you anonymize anything that you dont want the world to see@luthermonson commented on GitHub (Feb 25, 2024):
so it's not random by the way, it loops over storage results returned from this endpoint and chooses the first one which is allows the content type of "iso", the logic is here: https://github.com/luthermonson/go-proxmox/blob/main/nodes.go#L202-L211
we could allow for allowing the storage to be passed in or filtered differently... show me the output and let's see what we can work with
@SnelsSM commented on GitHub (Feb 26, 2024):
The "qnap" and "templates" storages can store iso in my case. But for store cloud-init isos I prefer to use only storage named "templates" because that storage is more reliable than "qnap".
And I have no idea how to do it.
Some temporary storages may store the iso for some maintenance/debugging.
In this case, it may happen that the cloud-init iso will be saved in some temporary storage, which will then be deleted.
VMs startup will be broken.
There is another problem here. Sometimes CloudInit tries to use storage "local" or "cephfs", which is disabled.
In this case, an error occurs:
@luthermonson commented on GitHub (Feb 26, 2024):
oh ya i could imagine it might appear random is the proxmox api sometimes return results in different orders. it's only picking storage that CAN have isos and it just so happens you have 2 that are disabled and the one it tries it never gets too... let me think about this for a bit and try and get a local setup that looks similar
@xeor commented on GitHub (Nov 11, 2025):
I think this is still an issue. I'm doing some labbing on proxmox using capi and ionos-cloud/cluster-api-provider-proxmox. I got 2 iso shares, one writable for cloud-init's and one on nfs that is read-only for os images. The vm's fails randomly to load their cloud-inits because it tries to create them on the wrong iso-volume..