-
Notifications
You must be signed in to change notification settings - Fork 175
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
Add guest tools framework #1257
Conversation
👯 👯 👯 |
|
||
s.wg.Add(1) | ||
go func() { | ||
defer s.wg.Done() |
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.
4a51de9
to
7da5621
Compare
I haven't tried within tether/container VM yet. Have tested cmd/toolbox on Ubuntu (devbox on ESX), just requires that you turn off the existing tools first:
I used debian to test a VM that doesn't have tools pre-installed:
Within the VNC console, boot live debian (user/pass is user/live).
On your-machine:
See tools-lite in action:
You'll see the following toolbox trace output:
|
vixPropertyTypeBlob | ||
) | ||
|
||
const ( |
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.
Should we add some comments to explain where are those coming from?
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.
All of the [Vv]ix constants are from vix.h, I was thinking about moving them all to a vix.go. Maybe even generate vix.go from vix.h, but there's a bunch that we don't need.
LGTM 🐑 🇮🇹 |
@@ -0,0 +1,71 @@ | |||
// Copyright 2016 VMware, Inc. All Rights Reserved. |
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.
This is linux specific given the vmw-guestinfo package - should it be backdoor_linux.go?
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.
This file does compile and run on Darwin as well, tho if you run cmd/toolbox/main.go it'll bail with an error "not in a virtual world" - but in theory that wouldn't happen if run within a VM. Likewise for Windows.
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.
however the bdoor package doesn't build on Windows.
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.
Ah right, the code in sigma/bdoor is unix only. I've added a tag for now so backdoor.go isn't built on windows:
// +build !windows
We can look at porting bdoor to windows in the future and/or use Go asm instead of cgo.
LGTM |
@hickeng this PR doesn't support execution of arbitrary commands. See cmd/toolbox/main.go, the example sets vix.ProcessStartCommand to just print the command path and args. So the tether can set this func to only handle a pseudo 'kill' command. We could also make use of the name/pass credentials to validate, but that is currently ignored. |
Not sure why LGTM isn't picked up |
Initial version to support vmware-tools "lite" in pure Go. Towards: Issue vmware#742 Issue vmware#407 Issue vmware#406
rebased |
Initial version to support vmware-tools "lite" in pure Go.
Towards:
Issue #742
Issue #407
Issue #406