-
Notifications
You must be signed in to change notification settings - Fork 248
OS-8711 - Support cloud-init NoCloud datasource for HVM guests #1172
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
base: master
Are you sure you want to change the base?
Conversation
danmcd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nits for now. I have to page-in my old days of upstreaming a fix to cloud-init to make sure I'm not missing something.
| @@ -0,0 +1,242 @@ | |||
| /* | |||
| * Copyright 2025 Edgecast Cloud LLC. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo 2026. AND missing license.
| @@ -0,0 +1,261 @@ | |||
| /* | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MIssing license.
| @@ -0,0 +1,9 @@ | |||
| /* | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing license.
|
One more thing: Are there illumos distros (OmniOS or OI) that could benefit from this? If so, we should add one as the fifth example image. |
|
Thanks @danmcd ! I updated those files with the CDDL license header. Regarding cloud-init behavior, I still have some testing to do there and some of the related code may change. I want to ensure we handle all the same keys that the mdata provider uses. I'm curious if you have any reservations about the lofs approach to building the FAT image? Or any preference for a pure JS solution that avoids the shelling out to utilities? I'm not sure what distros use this metadata-agent but there is a draft PR which adds nocloud support and appears to be looking for the same "CIDATA" labeled filesystem. I'll see if I can find an illumos image with existing support, that would be a great example to have. |
|
You're helping me remember things, thank yo.
Thank you for the update.
Yes yes yes... this was what I was trying to remember: canonical/cloud-init@55baf2d in particular.
At creation time we have less worry about latency. Unless there are existing JS tools other parts of SmartOS/smartos-live are using, we can shell out. Building the FAT image is exactly what lofs is for... we do this for our USB key construction. (And you may get angry with pcfs(4FS) flaws, but with a 16MB space, maybe not so much.)
From 2022, and it contains a conversation between OI's "Toasterson" and fellow illumos RTI advocate Josh Clulow. Toasterson isn't being rigorous in an illumos-gate way, it looks like, and nothing went anywhere after this. |
Looking for feedback on the general approach being taken here to enable NoCloud Cloud-Init support. I anticipate further code changes and testing but I don't want to spend too much time if we'd like to approach this differently.
The original goal was to enable Talos support and in doing so I found the NoCloud approach to also simplify HVM image creation for other distributions as well.
With these changes, creating a new image is roughly following process:
I have some examples here: https://github.com/travispaul/nocloud-images
Once you have a compatible image, the process at provisioning time is roughly:
To create the FAT filesystem lofiadm is being used, however I also experimented with a Claude generated FAT16 implementation that created the filesystem and wrote the files. The pure JS FAT module had less failure points and didn't exec anything but was a bit harder to review and was a little bit more code.
Portions generated by: Claude Opus 4.5 noreply@anthropic.com