-
Notifications
You must be signed in to change notification settings - Fork 1k
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
added vmware metadata provider, closes #3507 #3526
Conversation
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.
A few nits, but you'd also need to add a signed-off-by line to the commit. See https://github.com/linuxkit/linuxkit/blob/master/CONTRIBUTING.md#sign-your-work
I know it took a lot of time to fix missing bits and pieces. It seems all the checks are passing now, so can we merge this now? |
I know everyone is busy and it is not realistic to expect things always go fast for opensource projects. |
A bit off-topic; I built k3os image with this your merge request and deployed it to VMware virtual datacenter using vcloud director, so thanks for this patch! But for some reason my k3os installation on latest version of VMware cloud director wasn't able to read 'vmware' provider. On boot K3OS wasn't able to read guest-properties that I had added('guestinfo.user-data') and gave me just message "No metadata/userdata found. Bye". Have you got this provider working? If yes, with what platform and which guest-properties? |
As you said I am sure we should discuss these issues here either. I think the problem is key should be set as |
What's blocking this to be merged? |
pkg/metadata/provider_vmware.go
Outdated
|
||
// Probe checks if we are running on VMware | ||
func (p *ProviderVMware) Probe() bool { | ||
c, err := exec.LookPath("vmware-rpctool") |
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.
Will this really be available if built with linuxkit? Wouldn't this tool only be available in the open-vm-tools image?
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.
It will be available if open-vm-tools is intalled, which is sort of a requirement if you want to make RPC calls through VMCI to get guestinfo data.... I dont understand what is being requested.
This mirrors the functionality of vmware's cloud-init https://github.com/vmware/cloud-init-vmware-guestinfo/blob/master/DataSourceVMwareGuestInfo.py which functions the same way.
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.
Since edvinerikson has brought it up I had checked if it would be possible not to use the command-line tool and use a library instead. It is possible to use this library. But this pull request has been idle for so long I am not sure maintainers have any interest in accepting it. I do not want to work on it if it is not going to be ignored.
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.
I made a small PR to your source branch, as an example, with the said library 8 days ago: brlbil#1
This would give you the possibility of removing the vmware-rpctool
Any updates to this? |
Also looking for an update on this. Any thoughts? @rn |
Any updates to this? |
Hello @rn - could you review/approve this? |
@deitch Could you take a look at this? |
This looks pretty good, and you did address @rn's comments. The only questions I have are:
|
Completely separately, I see several people interested here. How are you using this (linuxkit in general)? |
@deitch originally I open this PR because linuxkit's metadata package is used in k3os When it comes to your questions,
Since there is an interest I will make the changes and push them. |
Go for it. And when done, please squash all of your commits. |
I'm using K3os in a homelab environment. I deploy Packer images with Terraform, so the quick and easy way is to use the provider. My current workaround is to use the File provisioner to write a config file at deployment, that K3os then loads to configure. This however does not leverage the capabilities of cloud-init. |
I do not have access to a vcenter currently, so I will test the latest changes next week just to make sure everything works as expected. |
@deitch I have tested the package on a VMWare VM, and it works as expected. |
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.
LGTM
Looks fine to me. Let CI go green and we can merge in. |
I just remembered, we need to build and push out the updated images, then run the script.
That can be a separate commit. Either way, though, CI is failing. Can you see what is causing it? |
@brlbil Any update on this? Really looking forward to configure k3os on vSphere without having to keep open a fork of linuxkit and build it every time I want a new ISO. |
@KittyKatt Unfortunately, I do not have any spare time to track the error that the pipeline throws. I have to do this on my own time. If anyone can help to track the error in the pipeline I would appreciate it. |
Appears the logs have expired for the Action that failed. Could it be re-run? |
@observ3r I cannot run them either. |
I tried looking into the errors when it was available and correcting/building locally, but unfortunately I am not anywhere near an expert in Go and couldn't make heads nor tails of it. Sorry! |
Hey @deitch , are you able to rerun it? |
The rerun button isn't there. 🤷♂️ Might as well rebase it to get the parallelization we did for actions (runs much more quickly), and push it out, which will cause CI to kick off again anyways. |
Oh awesome, lookin good! I suppose just waiting on @rn at this point? |
@brlbil Wanna rebase it? I don't think I can |
Looks like something relating to the added packages failed? Maybe a |
I think I see what is going on. The @deitch how to best avoid including VMware metadata in some of the architectures? I am pretty sure VMWare-tools is not supported on all the architectures that linuxkit is supporting like the arm. |
Really? No arm64 support? That is surprising. Do a dedicated file like |
Opened an issue for adding support for arm64 vmware-archive/vmw-guestinfo#25 @deitch I think we should proceed without arm64 support added. I have a feeling it would take a long time for it would be added upstream. If it is added then we can add support here as well. What do you think? |
Agreed. Just do the |
@deitch ci passed on my fork, needs your touch here. |
cloud-init data from vmware guest info as it described in the link below https://github.com/vmware/cloud-init-vmware-guestinfo Signed-off-by: Birol Bilgin <birolbilgin@gmail.com>
I fixed if check, the provider was added to the list when it is nil. |
cloud-init data from vmware guest info as it described in the link below
https://github.com/vmware/cloud-init-vmware-guestinfo
closes #3507
- What I did
Implemented a vmware metadata provider that leverages vmware guest info
- How I did it
Implemented Provider interface. Added provider_vmware file and added vmware to cdrom providers in main.go
- How to verify it
Guest info can be set for a vm using govc tool and can be tested in that vm as described.
https://github.com/vmware/cloud-init-vmware-guestinfo
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)