Skip to content
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

Tether: vsphere guest operations support #742

Closed
hickeng opened this issue May 20, 2016 · 11 comments
Closed

Tether: vsphere guest operations support #742

hickeng opened this issue May 20, 2016 · 11 comments
Assignees
Labels
area/vsphere Intergration and interoperation with vSphere component/tether kind/investigation A scoped effort to learn the answers to a set of questions which may include prototyping

Comments

@hickeng
Copy link
Member

hickeng commented May 20, 2016

There is a mechanism available in guest tools called "guest operations" - this causes a process to be executed within the guestOS. This implies there is a mechanism of some kind available to trigger operations within the guest as I refuse to believe vmtoolsd polls continuously.

I suspect this is related to #406 and #407, but regardless this is necessary for picking up reconfigure operations within the containerVMs.

@hickeng hickeng added kind/investigation A scoped effort to learn the answers to a set of questions which may include prototyping area/vsphere Intergration and interoperation with vSphere component/tether labels May 20, 2016
@mdubya66 mdubya66 added this to the TP3 milestone May 31, 2016
@dougm dougm self-assigned this Jun 21, 2016
@dougm
Copy link
Member

dougm commented Jun 23, 2016

I have this working (in sloppyjoe.go form) where we can receive RPC calls from the vmx. There's a few RPCs we need to support before its possible to run in-guest commands: reset, ping, set option, get tools status, etc. With proper responses to these RPCs in place to make the vmx happy, I can use the API to trigger a start-program RPC in guest like so:

govc guest.start -vm dougm-ubuntu-1604 -l user:pass -C /tmp -e FOO=bar /bin/date --date=@2147483647

Within sloppyjoe.go, we are able to decode the RPC request (credentials, current directory, env vars, program path, program args) - in the case of tether we can support pseudo commands with this RPC path, to reconfigure the container VM for example.

Also have the path to report the guest IP address when requested, and heartbeat (for HA).

It is actually a "poll" on the guest side, via the backdoor (vmtoolsd does this too). I see plumbing in vmtoolsd to use a vsocket for the transport, not being used by default with 6.0 afaict. But regardless if transport is the backdoor or vsocket, the RPC messages are in the same format. So, any decode/encode we implement would apply to either transport.

I'm expecting to open a PR by tomorrow with the basic framework in decent form.

@hickeng
Copy link
Member Author

hickeng commented Jun 27, 2016

@dougm awesome news doug! the only thing we're using this channel for as of TP3 is the signal delivery, so please prioritize that over other RPC responses. I was initially thinking of doing this via a read-write key that the tether would erase once the signal was delivered, and using a reload to pick it up, but if you think there's a cleaner way that doesn't involve a guestinfo key directly, then feel free.

dougm added a commit to dougm/vic that referenced this issue Jun 28, 2016
@dougm
Copy link
Member

dougm commented Jun 28, 2016

I still have some testing/cleanup/doc/etc todo before opening a PR, which should be by tomorrow for sure. In the meantime, my WIP is here: master...dougm:toolbox

dougm added a commit to dougm/vic that referenced this issue Jun 29, 2016
Initial version to support vmware-tools "lite" in pure Go.

Towards:

Issue vmware#742
Issue vmware#407
Issue vmware#406
dougm added a commit to dougm/vic that referenced this issue Jun 29, 2016
Initial version to support vmware-tools "lite" in pure Go.

Towards:

Issue vmware#742
Issue vmware#407
Issue vmware#406
dougm added a commit to dougm/vic that referenced this issue Jun 29, 2016
Initial version to support vmware-tools "lite" in pure Go.

Towards:

Issue vmware#742
Issue vmware#407
Issue vmware#406
dougm added a commit to dougm/vic that referenced this issue Jun 29, 2016
Initial version to support vmware-tools "lite" in pure Go.

Towards:

Issue vmware#742
Issue vmware#407
Issue vmware#406
dougm added a commit to dougm/vic that referenced this issue Jun 30, 2016
Initial version to support vmware-tools "lite" in pure Go.

Towards:

Issue vmware#742
Issue vmware#407
Issue vmware#406
dougm added a commit to dougm/vic that referenced this issue Jul 1, 2016
Initial version to support vmware-tools "lite" in pure Go.

Towards:

Issue vmware#742
Issue vmware#407
Issue vmware#406
@mdubya66
Copy link
Contributor

mdubya66 commented Jul 4, 2016

is this still required for tp3? @dougm @hickeng?

@dougm
Copy link
Member

dougm commented Jul 6, 2016

@mdubya66 spoke with @hickeng , we are calling this issue done after some more testing. In particular how the WebClient treats container VMs when our toolbox is running. Version/status reporting, guest shutdown, etc.

The actual tether integration with toolbox will start with #1267

@dougm dougm changed the title Tether: trigger reload from vsphere Tether: vsphere guest operations support Jul 6, 2016
@mdubya66
Copy link
Contributor

mdubya66 commented Jul 6, 2016

👍

dougm added a commit to dougm/vic that referenced this issue Jul 8, 2016
- Implement Capabilities_Register RPC

- Increase default polling interval, otherwise we may miss the
  Capabilities_Register call on startup

- Trace disabled by default

- Add ChannelOut.Request wrapper

- Add ESX (backdoor) test

Closes issue vmware#742
@dougm
Copy link
Member

dougm commented Jul 8, 2016

Have added more tests/fixes/features, a bit more todo and I'll have a PR by tomorrow. Current wip is here: master...dougm:toolbox

dougm added a commit to dougm/vic that referenced this issue Jul 8, 2016
- Implement Capabilities_Register RPC

- Use the same polling interval and backoff logic as vmtoolsd

- Add support for guest power operations

- Trace disabled by default

- Add ChannelOut.Request wrapper

- Add ESX (backdoor) test

Closes issue vmware#742
@dougm
Copy link
Member

dougm commented Jul 8, 2016

Pounded on this, ironing out a few more kinks, looking solid now. Also added support for guest power operations. And the UI no longer warns that "tools is not installed". My branch has been updated, but I'll wait to open a PR until TP3 merges are done.

dougm added a commit to dougm/vic that referenced this issue Jul 9, 2016
- Implement Capabilities_Register RPC

- Use the same polling interval and backoff logic as vmtoolsd

- Add support for guest power operations

- Trace disabled by default

- Add ChannelOut.Request wrapper

- Add ESX tests

Closes issue vmware#742
dougm added a commit to dougm/vic that referenced this issue Jul 9, 2016
- Implement Capabilities_Register RPC

- Use the same polling interval and backoff logic as vmtoolsd

- Add support for guest power operations

- Trace disabled by default

- Add ChannelOut.Request wrapper

- Add ESX tests

Closes issue vmware#742
dougm added a commit to dougm/vic that referenced this issue Jul 10, 2016
- Implement Capabilities_Register RPC

- Use the same polling interval and backoff logic as vmtoolsd

- Add support for guest power operations

- Trace disabled by default

- Add ChannelOut.Request wrapper

- Add ESX tests

Closes issue vmware#742
dougm added a commit to dougm/vic that referenced this issue Jul 10, 2016
- Implement Capabilities_Register RPC

- Use the same polling interval and backoff logic as vmtoolsd

- Add support for guest power operations

- Trace disabled by default

- Add ChannelOut.Request wrapper

- Add ESX tests

Closes issue vmware#742
dougm added a commit to dougm/vic that referenced this issue Jul 10, 2016
- Implement Capabilities_Register RPC

- Use the same polling interval and backoff logic as vmtoolsd

- Add support for guest power operations

- Trace disabled by default

- Add ChannelOut.Request wrapper

- Add ESX tests

Closes issue vmware#742
dougm added a commit to dougm/vic that referenced this issue Jul 11, 2016
- Implement Capabilities_Register RPC

- Use the same polling interval and backoff logic as vmtoolsd

- Add support for guest power operations

- Trace disabled by default

- Add ChannelOut.Request wrapper

- Add ESX tests

Closes issue vmware#742
dougm added a commit to dougm/vic that referenced this issue Jul 11, 2016
- Implement Capabilities_Register RPC

- Use the same polling interval and backoff logic as vmtoolsd

- Add support for guest power operations

- Trace disabled by default

- Add ChannelOut.Request wrapper

- Add ESX tests, additional unit tests

Closes issue vmware#742
@corrieb
Copy link
Contributor

corrieb commented Jul 13, 2016

Hey @dougm, can this be closed?

@dougm
Copy link
Member

dougm commented Jul 13, 2016

@corrieb it will auto-close when PR #1431 is merged

dougm added a commit that referenced this issue Jul 14, 2016
- Implement Capabilities_Register RPC

- Use the same polling interval and backoff logic as vmtoolsd

- Add support for guest power operations

- Trace disabled by default

- Add ChannelOut.Request wrapper

- Add ESX tests, additional unit tests

Closes issue #742
@dougm
Copy link
Member

dougm commented Jul 14, 2016

I used the wrong auto-close comment syntax in 1431, closed now with that being merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vsphere Intergration and interoperation with vSphere component/tether kind/investigation A scoped effort to learn the answers to a set of questions which may include prototyping
Projects
None yet
Development

No branches or pull requests

4 participants