{"action":"created","comment":{"url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/pulls/comments/48563672","id":48563672,"diff_hunk":"@@ -596,3 +575,52 @@ func trimMacAddress(rawUUID string) string {\n \n \treturn mac\n }\n+\n+func (d *Driver) xhyveArgs() []string {\n+\tuuid := d.UUID\n+\tvmlinuz := d.ResolveStorePath(\"vmlinuz64\")\n+\tinitrd := d.ResolveStorePath(\"initrd.img\")\n+\tiso := d.ResolveStorePath(isoFilename)\n+\timg := d.ResolveStorePath(d.MachineName + \".dmg\")\n+\tbootcmd := d.BootCmd\n+\n+\tcpus := d.CPU\n+\tif cpus < 1 {\n+\t\tcpus = int(runtime.NumCPU())\n+\t}\n+\n+\treturn []string{\n+\t\t\"xhyve\",\n+\t\t\"-A\",\n+\t\t\"-U\", fmt.Sprintf(\"%s\", uuid),\n+\t\t\"-c\", fmt.Sprintf(\"%d\", cpus),\n+\t\t\"-m\", fmt.Sprintf(\"%dM\", d.Memory),\n+\t\t\"-l\", \"com1\",\n+\t\t\"-s\", \"0:0,hostbridge\",\n+\t\t\"-s\", \"31,lpc\",\n+\t\t\"-s\", \"2:0,virtio-net\",\n+\t\t\"-s\", fmt.Sprintf(\"3,ahci-cd,%s\", iso),\n+\t\t\"-s\", fmt.Sprintf(\"4,virtio-blk,%s\", img),\n+\t\t\"-f\", fmt.Sprintf(\"kexec,%s,%s,%s\", vmlinuz, initrd, bootcmd)}\n+}\n+\n+func (d *Driver) getMACAdress() (string, error) {\n+\targs := append(d.xhyveArgs(), \"-M\")\n+\n+\tstdout := bytes.Buffer{}\n+\n+\tcmd := exec.Command(os.Args[0], args...) // TODO: Should be possible without exec","path":"xhyve.go","position":99,"original_position":99,"commit_id":"e7215247e946c3a7132293493466996fde1a2e30","original_commit_id":"e7215247e946c3a7132293493466996fde1a2e30","user":{"login":"johanneswuerbach","id":864578,"avatar_url":"https://avatars.githubusercontent.com/u/864578?v=3","gravatar_id":"","url":"https://api.github.com/users/johanneswuerbach","html_url":"https://github.com/johanneswuerbach","followers_url":"https://api.github.com/users/johanneswuerbach/followers","following_url":"https://api.github.com/users/johanneswuerbach/following{/other_user}","gists_url":"https://api.github.com/users/johanneswuerbach/gists{/gist_id}","starred_url":"https://api.github.com/users/johanneswuerbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanneswuerbach/subscriptions","organizations_url":"https://api.github.com/users/johanneswuerbach/orgs","repos_url":"https://api.github.com/users/johanneswuerbach/repos","events_url":"https://api.github.com/users/johanneswuerbach/events{/privacy}","received_events_url":"https://api.github.com/users/johanneswuerbach/received_events","type":"User","site_admin":false},"body":"I couldn't find a way to get the stdout of xhyve without spawning. This works as a workaround for now.","created_at":"2015-12-29T19:29:03Z","updated_at":"2015-12-29T19:29:03Z","html_url":"https://github.com/zchee/docker-machine-driver-xhyve/pull/38#discussion_r48563672","pull_request_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/pulls/comments/48563672"},"html":{"href":"https://github.com/zchee/docker-machine-driver-xhyve/pull/38#discussion_r48563672"},"pull_request":{"href":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/pulls/38","id":54751338,"html_url":"https://github.com/zchee/docker-machine-driver-xhyve/pull/38","diff_url":"https://github.com/zchee/docker-machine-driver-xhyve/pull/38.diff","patch_url":"https://github.com/zchee/docker-machine-driver-xhyve/pull/38.patch","issue_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/issues/38","number":38,"state":"open","locked":false,"title":"Use xhyve to get the mac address","user":{"login":"johanneswuerbach","id":864578,"avatar_url":"https://avatars.githubusercontent.com/u/864578?v=3","gravatar_id":"","url":"https://api.github.com/users/johanneswuerbach","html_url":"https://github.com/johanneswuerbach","followers_url":"https://api.github.com/users/johanneswuerbach/followers","following_url":"https://api.github.com/users/johanneswuerbach/following{/other_user}","gists_url":"https://api.github.com/users/johanneswuerbach/gists{/gist_id}","starred_url":"https://api.github.com/users/johanneswuerbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanneswuerbach/subscriptions","organizations_url":"https://api.github.com/users/johanneswuerbach/orgs","repos_url":"https://api.github.com/users/johanneswuerbach/repos","events_url":"https://api.github.com/users/johanneswuerbach/events{/privacy}","received_events_url":"https://api.github.com/users/johanneswuerbach/received_events","type":"User","site_admin":false},"body":"https://github.com/mist64/xhyve/pull/79 allows to fetch the mac address\nusing xhyve instead of using vmnet directly","created_at":"2015-12-29T19:28:08Z","updated_at":"2015-12-29T19:29:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2e4db9dbb3fa87f9708ce11d62df20c2676e19e8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/pulls/38/commits","review_comments_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/pulls/38/comments","review_comment_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/issues/38/comments","statuses_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/statuses/e7215247e946c3a7132293493466996fde1a2e30","head":{"label":"johanneswuerbach:mac-by-xhyve","ref":"mac-by-xhyve","sha":"e7215247e946c3a7132293493466996fde1a2e30","user":{"login":"johanneswuerbach","id":864578,"avatar_url":"https://avatars.githubusercontent.com/u/864578?v=3","gravatar_id":"","url":"https://api.github.com/users/johanneswuerbach","html_url":"https://github.com/johanneswuerbach","followers_url":"https://api.github.com/users/johanneswuerbach/followers","following_url":"https://api.github.com/users/johanneswuerbach/following{/other_user}","gists_url":"https://api.github.com/users/johanneswuerbach/gists{/gist_id}","starred_url":"https://api.github.com/users/johanneswuerbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanneswuerbach/subscriptions","organizations_url":"https://api.github.com/users/johanneswuerbach/orgs","repos_url":"https://api.github.com/users/johanneswuerbach/repos","events_url":"https://api.github.com/users/johanneswuerbach/events{/privacy}","received_events_url":"https://api.github.com/users/johanneswuerbach/received_events","type":"User","site_admin":false},"repo":{"id":46638161,"name":"docker-machine-xhyve","full_name":"johanneswuerbach/docker-machine-xhyve","owner":{"login":"johanneswuerbach","id":864578,"avatar_url":"https://avatars.githubusercontent.com/u/864578?v=3","gravatar_id":"","url":"https://api.github.com/users/johanneswuerbach","html_url":"https://github.com/johanneswuerbach","followers_url":"https://api.github.com/users/johanneswuerbach/followers","following_url":"https://api.github.com/users/johanneswuerbach/following{/other_user}","gists_url":"https://api.github.com/users/johanneswuerbach/gists{/gist_id}","starred_url":"https://api.github.com/users/johanneswuerbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanneswuerbach/subscriptions","organizations_url":"https://api.github.com/users/johanneswuerbach/orgs","repos_url":"https://api.github.com/users/johanneswuerbach/repos","events_url":"https://api.github.com/users/johanneswuerbach/events{/privacy}","received_events_url":"https://api.github.com/users/johanneswuerbach/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johanneswuerbach/docker-machine-xhyve","description":"Docker Machine driver plugin for xhyve (native OSX hypervisor)","fork":true,"url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve","forks_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/forks","keys_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/teams","hooks_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/hooks","issue_events_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/issues/events{/number}","events_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/events","assignees_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/assignees{/user}","branches_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/branches{/branch}","tags_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/tags","blobs_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/git/refs{/sha}","trees_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/statuses/{sha}","languages_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/languages","stargazers_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/stargazers","contributors_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/contributors","subscribers_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/subscribers","subscription_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/subscription","commits_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/commits{/sha}","git_commits_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/git/commits{/sha}","comments_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/comments{/number}","issue_comment_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/issues/comments{/number}","contents_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/contents/{+path}","compare_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/merges","archive_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/downloads","issues_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/issues{/number}","pulls_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/pulls{/number}","milestones_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/milestones{/number}","notifications_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/labels{/name}","releases_url":"https://api.github.com/repos/johanneswuerbach/docker-machine-xhyve/releases{/id}","created_at":"2015-11-21T23:20:55Z","updated_at":"2015-11-21T23:20:56Z","pushed_at":"2015-12-29T19:28:06Z","git_url":"git://github.com/johanneswuerbach/docker-machine-xhyve.git","ssh_url":"git@github.com:johanneswuerbach/docker-machine-xhyve.git","clone_url":"https://github.com/johanneswuerbach/docker-machine-xhyve.git","svn_url":"https://github.com/johanneswuerbach/docker-machine-xhyve","homepage":null,"size":13986,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zchee:master","ref":"master","sha":"b332fe7a21b1d69c9fdc8afbb8c3384cd0db1bc2","user":{"login":"zchee","id":6366270,"avatar_url":"https://avatars.githubusercontent.com/u/6366270?v=3","gravatar_id":"","url":"https://api.github.com/users/zchee","html_url":"https://github.com/zchee","followers_url":"https://api.github.com/users/zchee/followers","following_url":"https://api.github.com/users/zchee/following{/other_user}","gists_url":"https://api.github.com/users/zchee/gists{/gist_id}","starred_url":"https://api.github.com/users/zchee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zchee/subscriptions","organizations_url":"https://api.github.com/users/zchee/orgs","repos_url":"https://api.github.com/users/zchee/repos","events_url":"https://api.github.com/users/zchee/events{/privacy}","received_events_url":"https://api.github.com/users/zchee/received_events","type":"User","site_admin":false},"repo":{"id":42417822,"name":"docker-machine-driver-xhyve","full_name":"zchee/docker-machine-driver-xhyve","owner":{"login":"zchee","id":6366270,"avatar_url":"https://avatars.githubusercontent.com/u/6366270?v=3","gravatar_id":"","url":"https://api.github.com/users/zchee","html_url":"https://github.com/zchee","followers_url":"https://api.github.com/users/zchee/followers","following_url":"https://api.github.com/users/zchee/following{/other_user}","gists_url":"https://api.github.com/users/zchee/gists{/gist_id}","starred_url":"https://api.github.com/users/zchee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zchee/subscriptions","organizations_url":"https://api.github.com/users/zchee/orgs","repos_url":"https://api.github.com/users/zchee/repos","events_url":"https://api.github.com/users/zchee/events{/privacy}","received_events_url":"https://api.github.com/users/zchee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zchee/docker-machine-driver-xhyve","description":"Docker Machine driver plugin for xhyve (native OSX hypervisor)","fork":true,"url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve","forks_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/forks","keys_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/teams","hooks_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/hooks","issue_events_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/issues/events{/number}","events_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/events","assignees_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/assignees{/user}","branches_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/branches{/branch}","tags_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/tags","blobs_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/git/refs{/sha}","trees_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/statuses/{sha}","languages_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/languages","stargazers_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/stargazers","contributors_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/contributors","subscribers_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/subscribers","subscription_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/subscription","commits_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/commits{/sha}","git_commits_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/git/commits{/sha}","comments_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/comments{/number}","issue_comment_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/issues/comments{/number}","contents_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/contents/{+path}","compare_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/merges","archive_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/downloads","issues_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/issues{/number}","pulls_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/pulls{/number}","milestones_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/milestones{/number}","notifications_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/labels{/name}","releases_url":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/releases{/id}","created_at":"2015-09-14T00:09:42Z","updated_at":"2015-12-29T19:15:44Z","pushed_at":"2015-12-29T19:28:09Z","git_url":"git://github.com/zchee/docker-machine-driver-xhyve.git","ssh_url":"git@github.com:zchee/docker-machine-driver-xhyve.git","clone_url":"https://github.com/zchee/docker-machine-driver-xhyve.git","svn_url":"https://github.com/zchee/docker-machine-driver-xhyve","homepage":null,"size":13990,"stargazers_count":48,"watchers_count":48,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/pulls/38"},"html":{"href":"https://github.com/zchee/docker-machine-driver-xhyve/pull/38"},"issue":{"href":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/issues/38"},"comments":{"href":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/zchee/docker-machine-driver-xhyve/statuses/e7215247e946c3a7132293493466996fde1a2e30"}}}}