From ac63b7a2e58be376513909a3553a6a7cad44a49b Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Wed, 12 Apr 2017 17:31:49 +0100 Subject: [PATCH] Update HyperKit Signed-off-by: Ilya Dmitrichenko --- vendor.conf | 2 +- vendor/github.com/docker/hyperkit/go/hyperkit.go | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/vendor.conf b/vendor.conf index 7561a4a0e..6c7181e6b 100644 --- a/vendor.conf +++ b/vendor.conf @@ -9,7 +9,7 @@ github.com/docker/distribution 07f32ac1831ed0fc71960b7da5d6bb83cb6881b5 github.com/docker/engine-api cf82c64276ebc2501e72b241f9fdc1e21e421743 github.com/docker/go-connections e15c02316c12de00874640cd76311849de2aeed5 github.com/docker/go-units 651fc226e7441360384da338d0fd37f2440ffbe3 -github.com/docker/hyperkit c49c076a1b24883c61f5cfbec7943b2e16ad7c5a +github.com/docker/hyperkit 9b5f5fd848f0f5aedccb67a5a8cfa6787b8654f9 github.com/docker/infrakit cb420e3e50ea60afe58538b1d3cab1cb14059433 github.com/ghodss/yaml 0ca9ea5df5451ffdf184b4428c902747c2c11cd7 github.com/golang/protobuf c9c7427a2a70d2eb3bafa0ab2dc163e45f143317 diff --git a/vendor/github.com/docker/hyperkit/go/hyperkit.go b/vendor/github.com/docker/hyperkit/go/hyperkit.go index 7f43448ca..95d7e5488 100644 --- a/vendor/github.com/docker/hyperkit/go/hyperkit.go +++ b/vendor/github.com/docker/hyperkit/go/hyperkit.go @@ -69,7 +69,9 @@ type HyperKit struct { StateDir string `json:"state_dir"` // VPNKitSock is the location of the VPNKit socket used for networking. VPNKitSock string `json:"vpnkit_sock"` - // UUID is a string containing a UUID for the VM. It can be used in conjunction with VPNKit to get consistent IP address. + // VPNKitKey is a string containing a UUID, it can be used in conjunction with VPNKit to get consistent IP address. + VPNKitKey string `json:"vpnkit_key"` + // UUID is a string containing a UUID, it sets BIOS DMI UUID for the VM (as found in /sys/class/dmi/id/product_uuid on Linux). UUID string `json:"uuid"` // DiskImage is the path to the disk image to use DiskImage string `json:"disk"` @@ -344,12 +346,15 @@ func (h *HyperKit) buildArgs(cmdline string) { a = append(a, "-s", "0:0,hostbridge") if h.VPNKitSock != "" { - if h.UUID == "" { + if h.VPNKitKey == "" { a = append(a, "-s", fmt.Sprintf("1:0,virtio-vpnkit,path=%s", h.VPNKitSock)) } else { - a = append(a, "-s", fmt.Sprintf("1:0,virtio-vpnkit,path=%s,uuid=%s", h.VPNKitSock, h.UUID)) + a = append(a, "-s", fmt.Sprintf("1:0,virtio-vpnkit,path=%s,uuid=%s", h.VPNKitSock, h.VPNKitKey)) } } + if h.UUID != "" { + a = append(a, "-U", h.UUID) + } if h.DiskImage != "" { a = append(a, "-s", fmt.Sprintf("2:0,virtio-blk,%s", h.DiskImage)) }