Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 13 additions & 4 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import:
- package: github.com/johanneswuerbach/nfsexports
- package: github.com/mitchellh/go-ps
- package: github.com/zchee/go-qcow2
- package: github.com/zchee/libhyperkit
- package: github.com/jceel/lib9p
version: 7be3e0b914fbb2d2ecfe2984d02bacfd8e762eae
- package: github.com/zchee/go-vmnet
- package: github.com/moby/hyperkit
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should put version v0.20170425 so that each iteration shouldn't get from master.

- package: github.com/moby/hyperkit
  version: v0.20170425

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually need 62fb993cc65090d3efe29e9b1ed871b017eeaa4d, it contains a PR I submitted yesterday to add support for qcow and sparsebundle disks. What's the best way to pin to that in glide?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dlorenc Then you just put this hash as version. Below should work.

- package: github.com/moby/hyperkit
  version: 62fb993cc65090d3efe29e9b1ed871b017eeaa4d

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks!

testImport:
- package: github.com/stretchr/testify
version: v1.1.4
Expand Down
32 changes: 1 addition & 31 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,10 @@
package main

import (
"fmt"
"os"

"github.com/docker/machine/libmachine/drivers/plugin"
"github.com/zchee/docker-machine-driver-xhyve/xhyve"
hyperkit "github.com/zchee/libhyperkit"
)

func main() {
if len(os.Args) >= 2 && os.Args[1] == "xhyve" {
runXhyve()
} else {
plugin.RegisterDriver(xhyve.NewDriver("", ""))
}
}

func runXhyve() {
done := make(chan bool)
ptyCh := make(chan string)

args := os.Args[1:] // Technically we only need 2:, but a bug in hooklift/xhyve requires one arg in the beginning
go func() {
if err := hyperkit.Run(args, ptyCh); err != nil {
fmt.Println(err)
}
done <- true
}()

if os.Args[len(os.Args)-1] != "-M" {
fmt.Printf("Waiting on a pseudo-terminal to be ready... ")
pty := <-ptyCh
fmt.Printf("done\n")
fmt.Printf("Hook up your terminal emulator to %s in order to connect to your VM\n", pty)
}

<-done
plugin.RegisterDriver(xhyve.NewDriver("", ""))
}
7 changes: 7 additions & 0 deletions vendor/github.com/moby/hyperkit/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions vendor/github.com/moby/hyperkit/CODINGSTYLE.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 70 additions & 0 deletions vendor/github.com/moby/hyperkit/CONTRIBUTING.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 77 additions & 0 deletions vendor/github.com/moby/hyperkit/MAINTAINERS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading