Parallels / docker-machine-parallels

Parallels driver for Docker Machine https://github.com/docker/machine
MIT License
471 stars 35 forks source link

Parallels 16, issues with host connected to Shared network #93

Closed madsjakobsen closed 4 years ago

madsjakobsen commented 4 years ago

Hi, I just wanted to give a quick heads up, I assume this is due to a bug in parallels 16. after Upgrading to 16 I ran into the following message when trying to start the docker-machine instance:

Starting "docker"...
Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'

I check the UI and the option is enabled, I also tried with prlsrvctl net set Shared --connect-host-to-net on, however the Bound To: is no where to be found.

If I remove the check in isSharedConnected() just for testing and it seems to work fine, so I suspect it's a issue with the output from the command.

I will also raise the issue on the parallels forum

matttarantino commented 4 years ago

I am also experiencing this issue. @MadsJakobsen mind sharing where isSharedConnected() is so I can see if removing the check fixes my issue as well?

madsjakobsen commented 4 years ago

Hi @matttarantino the code is here: https://github.com/Parallels/docker-machine-parallels/blob/865d31df2dacb3534d6a6260b973184652cee67b/parallels_darwin.go#L790

I ended up changing it to the following snippet below, just as a workaround, and then followed the build instructions https://github.com/Parallels/docker-machine-parallels#build-from-source:

func isSharedConnected() (bool, error) {
    return true, nil
}
legal90 commented 4 years ago

@MadsJakobsen Could you please show the output of the command prlsrvctl net info Shared in your case, when you don't have Bound to: there?

madsjakobsen commented 4 years ago

@legal90 here is the output from prlsrvctl net info Shared:

Network ID: Shared
Type: shared
Parallels adapter:
    IPv4 address: 10.211.55.2
    IPv4 subnet mask: 255.255.255.0
    Host assign IP v6: off
    IPv6 address: fdb2:2c26:f4e4::1
    IPv6 subnet mask: ffff:ffff:ffff:ffff::
DHCPv4 server:
    Server address: 10.211.55.1
    IP scope start address: 10.211.55.1
    IP scope end address: 10.211.55.254
DHCPv6 server:
    Server address: fdb2:2c26:f4e4::
    IP scope start address: fdb2:2c26:f4e4::
    IP scope end address: fdb2:2c26:f4e4:0:ffff:ffff:ffff:ffff

NAT server:

Here is a screen shot of my preferences dialog:

Screenshot 2020-09-20 at 09 19 02
legal90 commented 4 years ago

Thanks, @MadsJakobsen ! Everything looks fine except that the line Bound To: vnic0 is missing. I guess, all the rest also works fine for you, e.q. the Mac host actually has a virtual interface with 10.211.55.2 assigned, so in can access the boot2docker VM.

@andreydanin @romankulikov Could you please check if that's the normal behavior, or a bug? Meanwhile, I'll change the regex to accept the line Parallels adapter: instead of Bound To: (it should work for all currently supported versions of Parallels Desktop)

dskr99 commented 4 years ago

@legal90 It is because Parallels now uses Apple's API to create a "vnic" analog on host and there will be no interface named vnic0 on BigSur. Now macOS creates own interface and plugs it into a bridge (with unknown for us name):

bridge100: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=3<RXCSUM,TXCSUM> ether f6:5c:89:49:bf:64 inet 10.211.55.2 netmask 0xffffff00 broadcast 10.211.55.255 inet6 fe80::808:8f9a:6bd9:121e%bridge100 prefixlen 64 secured scopeid 0xf

What if check presence of IP address instead of searching for vnic0? (If I understand right, that docker's script searches for vnic interface)

legal90 commented 4 years ago

What if check presence of IP address instead of searching for vnic0? (If I understand right, docker's script searches for vnic interface)

Currently we just search for Bound To: string in the output of prlsrvctl net info Shared command: https://github.com/Parallels/docker-machine-parallels/blob/865d31df2dacb3534d6a6260b973184652cee67b/parallels_darwin.go#L796

We can easily change it to something else pointing that the network interface for the Shared network is actually enabled on the host (like the checkbox "Connect Mac to this network" in GUI). Can I use Parallels adapter: string for that?

dskr99 commented 4 years ago

@legal90 could be a bit better to find ip-address in

Network ID: Shared Type: shared Parallels adapter: IPv4 address: 10.211.55.2

and then check presence of IP on host (by grepping output of ifconfig)

legal90 commented 4 years ago

@dskr99 OK, thanks! I'll check how we can do that

legal90 commented 4 years ago

Sorry that it took longer than I initially expected. I sent a PR with the fix according to what @dskr99 suggested above: https://github.com/Parallels/docker-machine-parallels/pull/96

legal90 commented 4 years ago

@MadsJakobsen the fix is released in v2.0.0 : https://github.com/Parallels/docker-machine-parallels/releases/tag/v2.0.0 Could you please verify it in your environment?

matttarantino commented 4 years ago

I installed the new release and now anytime I try to bring up a machine, my laptop kernel panics and reboots. I am on Big Sur beta 10, Parallels 16. How can I help troubleshoot?

andreydanin commented 4 years ago

@matttarantino Please create a problem report with technical details and send me it's number.

madsjakobsen commented 4 years ago

I installed the new release and now anytime I try to bring up a machine, my laptop kernel panics and reboots. I am on Big Sur beta 10, Parallels 16. How can I help troubleshoot?

@matttarantino are you using the Parallels hypervisor? I had the same behaviour with Big Sur beta, the fan would spin up and macOS would panic right after launching a VM. There is an issue on the Parallels forum describing the behaviour, the fix suggested is to use the Apple hypervisor: https://forum.parallels.com/threads/macos-big-sur-got-panic-when-i-tried-to-open-a-macos-client-in-pd-16.350681/

madsjakobsen commented 4 years ago

@MadsJakobsen the fix is released in v2.0.0 : https://github.com/Parallels/docker-machine-parallels/releases/tag/v2.0.0 Could you please verify it in your environment?

@legal90 Thanks, I downloaded the new release, and things looks good!

LukeCarrier commented 4 years ago

I still seem to be having this issue, even with the updated binary:

❯ /usr/local/bin/docker-machine-driver-parallels --version
docker-machine-driver-parallels version 2.0.0, build

 ~/go/src/github.com/Parallels/docker-machine-parallels  on master                                                   at 14:57:04
❯ minikube start --driver parallels --v=12 --alsologtostderr
I1017 14:58:43.784281   37217 out.go:191] Setting JSON to false
I1017 14:58:43.839760   37217 start.go:103] hostinfo: {"hostname":"Lukes-MBP","uptime":8798,"bootTime":1602934325,"procs":535,"os":"darwin","platform":"darwin","platformFamily":"","platformVersion":"11.0","kernelVersion":"20.1.0","virtualizationSystem":"","virtualizationRole":"","hostid":"d5ae727a-f8f2-31ee-b874-4e907b0c5115"}
W1017 14:58:43.839897   37217 start.go:111] gopshost.Virtualization returned error: not implemented yet
I1017 14:58:43.915169   37217 out.go:109] 😄  minikube v1.14.0 on Darwin 11.0
😄  minikube v1.14.0 on Darwin 11.0
I1017 14:58:43.915599   37217 notify.go:126] Checking for updates...
W1017 14:58:43.916391   37217 start.go:629] api.Load failed for minikube: filestore "minikube": Docker machine "minikube" does not exist. Use "docker-machine ls" to list machines. Use "docker-machine create" to add a new one.
I1017 14:58:43.916479   37217 driver.go:288] Setting default libvirt URI to qemu:///system
W1017 14:58:43.916535   37217 start.go:629] api.Load failed for minikube: filestore "minikube": Docker machine "minikube" does not exist. Use "docker-machine ls" to list machines. Use "docker-machine create" to add a new one.
I1017 14:58:43.983706   37217 out.go:109] ✨  Using the parallels driver based on existing profile
✨  Using the parallels driver based on existing profile
I1017 14:58:43.983730   37217 start.go:272] selected driver: parallels
I1017 14:58:43.983736   37217 start.go:680] validating driver "parallels" against &{Name:minikube KeepContext:false EmbedCerts:false MinikubeISO:https://storage.googleapis.com/minikube/iso/minikube-v1.13.1.iso KicBaseImage:gcr.io/k8s-minikube/kicbase:v0.0.13@sha256:4d43acbd0050148d4bc399931f1b15253b5e73815b63a67b8ab4a5c9e523403f Memory:6000 CPUs:2 DiskSize:20000 VMDriver: Driver:parallels HyperkitVpnKitSock: HyperkitVSockPorts:[] DockerEnv:[] ContainerVolumeMounts:[] InsecureRegistry:[] RegistryMirror:[] HostOnlyCIDR:192.168.99.1/24 HypervVirtualSwitch: HypervUseExternalSwitch:false HypervExternalAdapter: KVMNetwork:default KVMQemuURI:qemu:///system KVMGPU:false KVMHidden:false DockerOpt:[] DisableDriverMounts:false NFSShare:[] NFSSharesRoot:/nfsshares UUID: NoVTXCheck:false DNSProxy:false HostDNSResolver:true HostOnlyNicType:virtio NatNicType:virtio KubernetesConfig:{KubernetesVersion:v1.19.2 ClusterName:minikube APIServerName:minikubeCA APIServerNames:[] APIServerIPs:[] DNSDomain:cluster.local ContainerRuntime:docker CRISocket: NetworkPlugin: FeatureGates: ServiceCIDR:10.96.0.0/12 ImageRepository: LoadBalancerStartIP: LoadBalancerEndIP: ExtraOptions:[] ShouldLoadCachedImages:true EnableDefaultCNI:false CNI: NodeIP: NodePort:8443 NodeName:} Nodes:[{Name: IP: Port:8443 KubernetesVersion:v1.19.2 ControlPlane:true Worker:true}] Addons:map[] VerifyComponents:map[apiserver:true system_pods:true] StartHostTimeout:6m0s ExposedPorts:[]}
I1017 14:58:43.983857   37217 start.go:691] status for parallels: {Installed:true Healthy:true Running:true NeedsImprovement:false Error:<nil> Fix: Doc:}
I1017 14:58:43.990526   37217 start_flags.go:353] config:
{Name:minikube KeepContext:false EmbedCerts:false MinikubeISO:https://storage.googleapis.com/minikube/iso/minikube-v1.13.1.iso KicBaseImage:gcr.io/k8s-minikube/kicbase:v0.0.13@sha256:4d43acbd0050148d4bc399931f1b15253b5e73815b63a67b8ab4a5c9e523403f Memory:6000 CPUs:2 DiskSize:20000 VMDriver: Driver:parallels HyperkitVpnKitSock: HyperkitVSockPorts:[] DockerEnv:[] ContainerVolumeMounts:[] InsecureRegistry:[] RegistryMirror:[] HostOnlyCIDR:192.168.99.1/24 HypervVirtualSwitch: HypervUseExternalSwitch:false HypervExternalAdapter: KVMNetwork:default KVMQemuURI:qemu:///system KVMGPU:false KVMHidden:false DockerOpt:[] DisableDriverMounts:false NFSShare:[] NFSSharesRoot:/nfsshares UUID: NoVTXCheck:false DNSProxy:false HostDNSResolver:true HostOnlyNicType:virtio NatNicType:virtio KubernetesConfig:{KubernetesVersion:v1.19.2 ClusterName:minikube APIServerName:minikubeCA APIServerNames:[] APIServerIPs:[] DNSDomain:cluster.local ContainerRuntime:docker CRISocket: NetworkPlugin: FeatureGates: ServiceCIDR:10.96.0.0/12 ImageRepository: LoadBalancerStartIP: LoadBalancerEndIP: ExtraOptions:[] ShouldLoadCachedImages:true EnableDefaultCNI:false CNI: NodeIP: NodePort:8443 NodeName:} Nodes:[{Name: IP: Port:8443 KubernetesVersion:v1.19.2 ControlPlane:true Worker:true}] Addons:map[] VerifyComponents:map[apiserver:true system_pods:true] StartHostTimeout:6m0s ExposedPorts:[]}
I1017 14:58:43.990763   37217 iso.go:119] acquiring lock: {Name:mk45f8ab748431965bd9281354b3b2ed7b00f949 Clock:{} Delay:500ms Timeout:10m0s Cancel:<nil>}
I1017 14:58:44.068201   37217 out.go:109] 👍  Starting control plane node minikube in cluster minikube
👍  Starting control plane node minikube in cluster minikube
I1017 14:58:44.068232   37217 preload.go:97] Checking if preload exists for k8s version v1.19.2 and runtime docker
W1017 14:58:44.384071   37217 preload.go:118] https://storage.googleapis.com/minikube-preloaded-volume-tarballs/preloaded-images-k8s-v6-v1.19.2-docker-overlay2-amd64.tar.lz4 status code: 403
I1017 14:58:44.384202   37217 profile.go:150] Saving config to /Users/lukecarrier/.minikube/profiles/minikube/config.json ...
I1017 14:58:44.384246   37217 cache.go:92] acquiring lock: {Name:mkd19943c233563d7217b57d0674ed0410895b9d Clock:{} Delay:500ms Timeout:10m0s Cancel:<nil>}
I1017 14:58:44.384263   37217 cache.go:92] acquiring lock: {Name:mk086733abeed5318d0d196c52c85ecb593bc3d4 Clock:{} Delay:500ms Timeout:10m0s Cancel:<nil>}
I1017 14:58:44.384317   37217 cache.go:92] acquiring lock: {Name:mkcc70f764cde4164cbc83a535e723c19a61b032 Clock:{} Delay:500ms Timeout:10m0s Cancel:<nil>}
I1017 14:58:44.384351   37217 cache.go:92] acquiring lock: {Name:mk447ed5121c38da1a826473ea32258b36775042 Clock:{} Delay:500ms Timeout:10m0s Cancel:<nil>}
I1017 14:58:44.384374   37217 cache.go:100] /Users/lukecarrier/.minikube/cache/images/kubernetesui/metrics-scraper_v1.0.4 exists
I1017 14:58:44.384396   37217 cache.go:81] cache image "kubernetesui/metrics-scraper:v1.0.4" -> "/Users/lukecarrier/.minikube/cache/images/kubernetesui/metrics-scraper_v1.0.4" took 165.227µs
I1017 14:58:44.384382   37217 cache.go:92] acquiring lock: {Name:mk7aa389682d9ab831dcf6a99c6bd805b80ca7b1 Clock:{} Delay:500ms Timeout:10m0s Cancel:<nil>}
I1017 14:58:44.384411   37217 cache.go:66] save to tar file kubernetesui/metrics-scraper:v1.0.4 -> /Users/lukecarrier/.minikube/cache/images/kubernetesui/metrics-scraper_v1.0.4 succeeded
I1017 14:58:44.384411   37217 cache.go:100] /Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/coredns_1.7.0 exists
I1017 14:58:44.384391   37217 cache.go:92] acquiring lock: {Name:mk8a76249a2d0bcad08475091af6d825cabe44bc Clock:{} Delay:500ms Timeout:10m0s Cancel:<nil>}
I1017 14:58:44.384430   37217 cache.go:92] acquiring lock: {Name:mkd69cbae263dcda2c4b9995c763187c5d8c8be7 Clock:{} Delay:500ms Timeout:10m0s Cancel:<nil>}
I1017 14:58:44.384432   37217 cache.go:92] acquiring lock: {Name:mkd91b698dbe201641c6f42efecbf7b2fa808595 Clock:{} Delay:500ms Timeout:10m0s Cancel:<nil>}
I1017 14:58:44.384440   37217 cache.go:81] cache image "k8s.gcr.io/coredns:1.7.0" -> "/Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/coredns_1.7.0" took 194.788µs
I1017 14:58:44.384469   37217 cache.go:66] save to tar file k8s.gcr.io/coredns:1.7.0 -> /Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/coredns_1.7.0 succeeded
I1017 14:58:44.384527   37217 cache.go:100] /Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/pause_3.2 exists
I1017 14:58:44.384546   37217 cache.go:100] /Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/kube-apiserver_v1.19.2 exists
I1017 14:58:44.384516   37217 cache.go:92] acquiring lock: {Name:mkf08d1882aeb2623d18ec34284505f4b97b7235 Clock:{} Delay:500ms Timeout:10m0s Cancel:<nil>}
I1017 14:58:44.384555   37217 cache.go:100] /Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/kube-controller-manager_v1.19.2 exists
I1017 14:58:44.384566   37217 cache.go:100] /Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/kube-proxy_v1.19.2 exists
I1017 14:58:44.384572   37217 cache.go:81] cache image "k8s.gcr.io/kube-controller-manager:v1.19.2" -> "/Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/kube-controller-manager_v1.19.2" took 196.376µs
I1017 14:58:44.384570   37217 image.go:168] retrieving image: k8s.gcr.io/etcd:3.4.13-0
I1017 14:58:44.384584   37217 cache.go:66] save to tar file k8s.gcr.io/kube-controller-manager:v1.19.2 -> /Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/kube-controller-manager_v1.19.2 succeeded
I1017 14:58:44.384562   37217 cache.go:81] cache image "k8s.gcr.io/kube-apiserver:v1.19.2" -> "/Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/kube-apiserver_v1.19.2" took 139.903µs
I1017 14:58:44.384651   37217 cache.go:66] save to tar file k8s.gcr.io/kube-apiserver:v1.19.2 -> /Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/kube-apiserver_v1.19.2 succeeded
I1017 14:58:44.384585   37217 cache.go:81] cache image "k8s.gcr.io/kube-proxy:v1.19.2" -> "/Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/kube-proxy_v1.19.2" took 156.917µs
I1017 14:58:44.384665   37217 cache.go:66] save to tar file k8s.gcr.io/kube-proxy:v1.19.2 -> /Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/kube-proxy_v1.19.2 succeeded
I1017 14:58:44.384546   37217 cache.go:81] cache image "k8s.gcr.io/pause:3.2" -> "/Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/pause_3.2" took 252.801µs
I1017 14:58:44.384706   37217 cache.go:100] /Users/lukecarrier/.minikube/cache/images/kubernetesui/dashboard_v2.0.3 exists
I1017 14:58:44.384709   37217 cache.go:66] save to tar file k8s.gcr.io/pause:3.2 -> /Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/pause_3.2 succeeded
I1017 14:58:44.384381   37217 cache.go:92] acquiring lock: {Name:mk118104d814002afd26a3c6422f88e6845f7142 Clock:{} Delay:500ms Timeout:10m0s Cancel:<nil>}
I1017 14:58:44.384720   37217 cache.go:81] cache image "kubernetesui/dashboard:v2.0.3" -> "/Users/lukecarrier/.minikube/cache/images/kubernetesui/dashboard_v2.0.3" took 253.344µs
I1017 14:58:44.384737   37217 cache.go:66] save to tar file kubernetesui/dashboard:v2.0.3 -> /Users/lukecarrier/.minikube/cache/images/kubernetesui/dashboard_v2.0.3 succeeded
I1017 14:58:44.384616   37217 cache.go:100] /Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/kube-scheduler_v1.19.2 exists
I1017 14:58:44.384759   37217 cache.go:81] cache image "k8s.gcr.io/kube-scheduler:v1.19.2" -> "/Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/kube-scheduler_v1.19.2" took 420.802µs
I1017 14:58:44.384776   37217 cache.go:66] save to tar file k8s.gcr.io/kube-scheduler:v1.19.2 -> /Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/kube-scheduler_v1.19.2 succeeded
I1017 14:58:44.384819   37217 cache.go:100] /Users/lukecarrier/.minikube/cache/images/gcr.io/k8s-minikube/storage-provisioner_v3 exists
I1017 14:58:44.384835   37217 cache.go:81] cache image "gcr.io/k8s-minikube/storage-provisioner:v3" -> "/Users/lukecarrier/.minikube/cache/images/gcr.io/k8s-minikube/storage-provisioner_v3" took 501.666µs
I1017 14:58:44.384847   37217 cache.go:66] save to tar file gcr.io/k8s-minikube/storage-provisioner:v3 -> /Users/lukecarrier/.minikube/cache/images/gcr.io/k8s-minikube/storage-provisioner_v3 succeeded
I1017 14:58:44.384911   37217 cache.go:182] Successfully downloaded all kic artifacts
I1017 14:58:44.384937   37217 start.go:314] acquiring machines lock for minikube: {Name:mk0ae7102c593fd4daad5441b1e460a5752c0018 Clock:{} Delay:500ms Timeout:13m0s Cancel:<nil>}
I1017 14:58:44.384961   37217 image.go:176] daemon lookup for k8s.gcr.io/etcd:3.4.13-0: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I1017 14:58:44.385015   37217 start.go:318] acquired machines lock for "minikube" in 65.805µs
I1017 14:58:44.385042   37217 start.go:90] Provisioning new machine with config: &{Name:minikube KeepContext:false EmbedCerts:false MinikubeISO:https://storage.googleapis.com/minikube/iso/minikube-v1.13.1.iso KicBaseImage:gcr.io/k8s-minikube/kicbase:v0.0.13@sha256:4d43acbd0050148d4bc399931f1b15253b5e73815b63a67b8ab4a5c9e523403f Memory:6000 CPUs:2 DiskSize:20000 VMDriver: Driver:parallels HyperkitVpnKitSock: HyperkitVSockPorts:[] DockerEnv:[] ContainerVolumeMounts:[] InsecureRegistry:[] RegistryMirror:[] HostOnlyCIDR:192.168.99.1/24 HypervVirtualSwitch: HypervUseExternalSwitch:false HypervExternalAdapter: KVMNetwork:default KVMQemuURI:qemu:///system KVMGPU:false KVMHidden:false DockerOpt:[] DisableDriverMounts:false NFSShare:[] NFSSharesRoot:/nfsshares UUID: NoVTXCheck:false DNSProxy:false HostDNSResolver:true HostOnlyNicType:virtio NatNicType:virtio KubernetesConfig:{KubernetesVersion:v1.19.2 ClusterName:minikube APIServerName:minikubeCA APIServerNames:[] APIServerIPs:[] DNSDomain:cluster.local ContainerRuntime:docker CRISocket: NetworkPlugin: FeatureGates: ServiceCIDR:10.96.0.0/12 ImageRepository: LoadBalancerStartIP: LoadBalancerEndIP: ExtraOptions:[] ShouldLoadCachedImages:true EnableDefaultCNI:false CNI: NodeIP: NodePort:8443 NodeName:} Nodes:[{Name: IP: Port:8443 KubernetesVersion:v1.19.2 ControlPlane:true Worker:true}] Addons:map[] VerifyComponents:map[apiserver:true system_pods:true] StartHostTimeout:6m0s ExposedPorts:[]} &{Name: IP: Port:8443 KubernetesVersion:v1.19.2 ControlPlane:true Worker:true}
I1017 14:58:44.385165   37217 start.go:127] createHost starting for "" (driver="parallels")
I1017 14:58:44.457137   37217 out.go:109] 🔥  Creating parallels VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
🔥  Creating parallels VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
I1017 14:58:44.457409   37217 start.go:164] libmachine.API.Create for "minikube" (driver="parallels")
I1017 14:58:44.457503   37217 client.go:165] LocalClient.Create starting
I1017 14:58:44.457614   37217 main.go:118] libmachine: Reading certificate data from /Users/lukecarrier/.minikube/certs/ca.pem
I1017 14:58:44.457695   37217 main.go:118] libmachine: Decoding PEM data...
I1017 14:58:44.457724   37217 main.go:118] libmachine: Parsing certificate...
I1017 14:58:44.457856   37217 main.go:118] libmachine: Reading certificate data from /Users/lukecarrier/.minikube/certs/cert.pem
I1017 14:58:44.457919   37217 main.go:118] libmachine: Decoding PEM data...
I1017 14:58:44.457939   37217 main.go:118] libmachine: Parsing certificate...
I1017 14:58:44.458008   37217 main.go:118] libmachine: executing: /usr/local/bin/prlctl --version
I1017 14:58:44.588721   37217 main.go:118] libmachine: executing: /usr/local/bin/prlsrvctl info --license
I1017 14:58:44.742470   37217 main.go:118] libmachine: Found Parallels Desktop version: &{%!d(string=) %!d(string=) [16 0 1] 3 %!d(string=16.0.1)}, edition: pro
I1017 14:58:44.742500   37217 main.go:118] libmachine: executing: /usr/local/bin/prlsrvctl net info Shared
I1017 14:58:44.904974   37217 cache.go:134] opening:  /Users/lukecarrier/.minikube/cache/images/k8s.gcr.io/etcd_3.4.13-0
I1017 14:58:45.046274   37217 client.go:168] LocalClient.Create took 588.734206ms
I1017 14:58:47.046647   37217 start.go:130] duration metric: createHost completed in 2.661389288s
I1017 14:58:47.046665   37217 start.go:81] releasing machines lock for "minikube", held for 2.661559776s
W1017 14:58:47.046688   37217 start.go:377] error starting host: creating host: create: precreate: Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'
I1017 14:58:47.046841   37217 cli_runner.go:110] Run: docker container inspect minikube --format={{.State.Status}}
W1017 14:58:47.172287   37217 cli_runner.go:148] docker container inspect minikube --format={{.State.Status}} returned with exit code 1
I1017 14:58:47.172356   37217 delete.go:46] couldn't inspect container "minikube" before deleting: unknown state "minikube": docker container inspect minikube --format={{.State.Status}}: exit status 1
stdout:

stderr:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I1017 14:58:47.172552   37217 cli_runner.go:110] Run: podman container inspect minikube --format={{.State.Status}}
I1017 14:58:47.172578   37217 delete.go:46] couldn't inspect container "minikube" before deleting: unknown state "minikube": podman container inspect minikube --format={{.State.Status}}: exec: "podman": executable file not found in $PATH
stdout:

stderr:
W1017 14:58:47.172620   37217 start.go:382] delete host: Docker machine "minikube" does not exist. Use "docker-machine ls" to list machines. Use "docker-machine create" to add a new one.
W1017 14:58:47.172759   37217 out.go:145] 🤦  StartHost failed, but will try again: creating host: create: precreate: Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'
🤦  StartHost failed, but will try again: creating host: create: precreate: Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'
I1017 14:58:47.172772   37217 start.go:392] Will try again in 5 seconds ...
I1017 14:58:52.172967   37217 start.go:314] acquiring machines lock for minikube: {Name:mk0ae7102c593fd4daad5441b1e460a5752c0018 Clock:{} Delay:500ms Timeout:13m0s Cancel:<nil>}
I1017 14:58:52.173081   37217 start.go:318] acquired machines lock for "minikube" in 94.272µs
I1017 14:58:52.173106   37217 start.go:90] Provisioning new machine with config: &{Name:minikube KeepContext:false EmbedCerts:false MinikubeISO:https://storage.googleapis.com/minikube/iso/minikube-v1.13.1.iso KicBaseImage:gcr.io/k8s-minikube/kicbase:v0.0.13@sha256:4d43acbd0050148d4bc399931f1b15253b5e73815b63a67b8ab4a5c9e523403f Memory:6000 CPUs:2 DiskSize:20000 VMDriver: Driver:parallels HyperkitVpnKitSock: HyperkitVSockPorts:[] DockerEnv:[] ContainerVolumeMounts:[] InsecureRegistry:[] RegistryMirror:[] HostOnlyCIDR:192.168.99.1/24 HypervVirtualSwitch: HypervUseExternalSwitch:false HypervExternalAdapter: KVMNetwork:default KVMQemuURI:qemu:///system KVMGPU:false KVMHidden:false DockerOpt:[] DisableDriverMounts:false NFSShare:[] NFSSharesRoot:/nfsshares UUID: NoVTXCheck:false DNSProxy:false HostDNSResolver:true HostOnlyNicType:virtio NatNicType:virtio KubernetesConfig:{KubernetesVersion:v1.19.2 ClusterName:minikube APIServerName:minikubeCA APIServerNames:[] APIServerIPs:[] DNSDomain:cluster.local ContainerRuntime:docker CRISocket: NetworkPlugin: FeatureGates: ServiceCIDR:10.96.0.0/12 ImageRepository: LoadBalancerStartIP: LoadBalancerEndIP: ExtraOptions:[] ShouldLoadCachedImages:true EnableDefaultCNI:false CNI: NodeIP: NodePort:8443 NodeName:} Nodes:[{Name: IP: Port:8443 KubernetesVersion:v1.19.2 ControlPlane:true Worker:true}] Addons:map[] VerifyComponents:map[apiserver:true system_pods:true] StartHostTimeout:6m0s ExposedPorts:[]} &{Name: IP: Port:8443 KubernetesVersion:v1.19.2 ControlPlane:true Worker:true}
I1017 14:58:52.173206   37217 start.go:127] createHost starting for "" (driver="parallels")
I1017 14:58:52.248505   37217 out.go:109] 🔥  Creating parallels VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
🔥  Creating parallels VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
I1017 14:58:52.248643   37217 start.go:164] libmachine.API.Create for "minikube" (driver="parallels")
I1017 14:58:52.248682   37217 client.go:165] LocalClient.Create starting
I1017 14:58:52.248742   37217 main.go:118] libmachine: Reading certificate data from /Users/lukecarrier/.minikube/certs/ca.pem
I1017 14:58:52.248799   37217 main.go:118] libmachine: Decoding PEM data...
I1017 14:58:52.248815   37217 main.go:118] libmachine: Parsing certificate...
I1017 14:58:52.248913   37217 main.go:118] libmachine: Reading certificate data from /Users/lukecarrier/.minikube/certs/cert.pem
I1017 14:58:52.248954   37217 main.go:118] libmachine: Decoding PEM data...
I1017 14:58:52.248969   37217 main.go:118] libmachine: Parsing certificate...
I1017 14:58:52.249016   37217 main.go:118] libmachine: executing: /usr/local/bin/prlctl --version
I1017 14:58:52.360967   37217 main.go:118] libmachine: executing: /usr/local/bin/prlsrvctl info --license
I1017 14:58:52.503807   37217 main.go:118] libmachine: Found Parallels Desktop version: &{%!d(string=) %!d(string=) [16 0 1] 3 %!d(string=16.0.1)}, edition: pro
I1017 14:58:52.503845   37217 main.go:118] libmachine: executing: /usr/local/bin/prlsrvctl net info Shared
I1017 14:58:52.729787   37217 client.go:168] LocalClient.Create took 481.081952ms
I1017 14:58:54.729932   37217 start.go:130] duration metric: createHost completed in 2.556630723s
I1017 14:58:54.729952   37217 start.go:81] releasing machines lock for "minikube", held for 2.556781393s
W1017 14:58:54.730112   37217 out.go:145] 😿  Failed to start parallels VM. Running "minikube delete" may fix it: creating host: create: precreate: Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'
😿  Failed to start parallels VM. Running "minikube delete" may fix it: creating host: create: precreate: Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'
I1017 14:58:54.798594   37217 out.go:109]

W1017 14:58:54.798804   37217 out.go:145] ❌  Exiting due to GUEST_PROVISION: Failed to start host: creating host: create: precreate: Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'
❌  Exiting due to GUEST_PROVISION: Failed to start host: creating host: create: precreate: Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'
W1017 14:58:54.798841   37217 out.go:145]

W1017 14:58:54.798889   37217 out.go:145] 😿  If the above advice does not help, please let us know:
😿  If the above advice does not help, please let us know:
W1017 14:58:54.798922   37217 out.go:145] 👉  https://github.com/kubernetes/minikube/issues/new/choose
👉  https://github.com/kubernetes/minikube/issues/new/choose
I1017 14:58:54.870998   37217 out.go:109]

I tried building from source but even after verifying it was the first copy of the driver in my PATH and commenting out both of the checks I couldn't get it working. Particularly strangely, if this is the version it's using I don't see why this expression wouldn't match:

❯ /usr/local/bin/prlsrvctl net info Shared
Network ID: Shared
Type: shared
Parallels adapter:
    IPv4 address: 10.211.55.2
    IPv4 subnet mask: 255.255.255.0
    Host assign IP v6: off
    IPv6 address: fdb2:2c26:f4e4::1
    IPv6 subnet mask: ffff:ffff:ffff:ffff::
DHCPv4 server:
    Server address: 10.211.55.1
    IP scope start address: 10.211.55.1
    IP scope end address: 10.211.55.254
DHCPv6 server:
    Server address: fdb2:2c26:f4e4::
    IP scope start address: fdb2:2c26:f4e4::
    IP scope end address: fdb2:2c26:f4e4:0:ffff:ffff:ffff:ffff

NAT server:
legal90 commented 4 years ago

@LukeCarrier according to the error message you've got, you are still using the old version of docker-machine-driver-parallels:

Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'

In v2.0.0 we've changed the phrase Please, enable this option to Please, ensure this option is set : https://github.com/Parallels/docker-machine-parallels/pull/96/files#diff-36e7efdbaacec2bf1d02ae428610b099fe59d07102fa975abd660cf924f35633R51

Please, make sure that the executable docker-machine-driver-parallels in your PATH is actually v2.0.0 (or your custom build from latest master). You can check it this way:

$ which docker-machine-driver-parallels
/usr/local/bin/docker-machine-driver-parallels

$ /usr/local/bin/docker-machine-driver-parallels --version
docker-machine-driver-parallels version 2.0.0, build d640c38
LukeCarrier commented 4 years ago

I can see the difference in the text and I agree with your assessment, but even after unlinking the Homebrew installed docker-machine-parallels and copying my own binary to /usr/local/bin/docker-machine-driver-parallels I still see the same error:

❯ which docker-machine-driver-parallels
/usr/local/bin/docker-machine-driver-parallels

❯ /usr/local/bin/docker-machine-driver-parallels --version
docker-machine-driver-parallels version 2.0.0, build d35f911

❯ minikube start --driver parallels
😄  minikube v1.14.0 on Darwin 11.0
✨  Using the parallels driver based on existing profile
👍  Starting control plane node minikube in cluster minikube
🔥  Creating parallels VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
🤦  StartHost failed, but will try again: creating host: create: precreate: Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'
🔥  Creating parallels VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
😿  Failed to start parallels VM. Running "minikube delete" may fix it: creating host: create: precreate: Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'

❌  Exiting due to GUEST_PROVISION: Failed to start host: creating host: create: precreate: Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'

😿  If the above advice does not help, please let us know:
👉  https://github.com/kubernetes/minikube/issues/new/choose

I figured it was just using a different binary, so I deleted it and tried again:

❯ rm -f /usr/local/bin/docker-machine-driver-parallels

❯ minikube start --driver parallels
😄  minikube v1.14.0 on Darwin 11.0
✨  Using the parallels driver based on existing profile

🤷  Exiting due to PROVIDER_PARALLELS_NOT_FOUND: The 'parallels' provider was not found: exec: "docker-machine-driver-parallels": executable file not found in $PATH
💡  Suggestion: Install docker-machine-driver-parallels
📘  Documentation: https://minikube.sigs.k8s.io/docs/reference/drivers/parallels/

Even stranger:

❯ strings ~/go/bin/docker-machine-driver-parallels | grep 'Please, enable this option'

I'm missing something, any ideas?

LukeCarrier commented 4 years ago

As if this wasn't baffling enough:

❯ curl -L -o /usr/local/bin/docker-machine-driver-parallels https://github.com/Parallels/docker-machine-parallels/releases/download/v2.0.0/docker-machine-driver-parallels && chmod +x /usr/local/bin/docker-machine-driver-parallels
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   655  100   655    0     0   2538      0 --:--:-- --:--:-- --:--:--  2538
100 12.3M  100 12.3M    0     0  1088k      0  0:00:11  0:00:11 --:--:-- 1760k

 ~                                                    took 12s  at 19:58:45
❯ minikube start --driver parallels
😄  minikube v1.14.0 on Darwin 11.0
✨  Using the parallels driver based on existing profile
👍  Starting control plane node minikube in cluster minikube
🔥  Creating parallels VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
🤦  StartHost failed, but will try again: creating host: create: precreate: Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'
🔥  Creating parallels VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
😿  Failed to start parallels VM. Running "minikube delete" may fix it: creating host: create: precreate: Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'

❌  Exiting due to GUEST_PROVISION: Failed to start host: creating host: create: precreate: Your Mac host is not connected to Shared network. Please, enable this option: 'Parallels Desktop' -> 'Preferences' -> 'Network' -> 'Shared' -> 'Connect Mac to this network'

😿  If the above advice does not help, please let us know:
👉  https://github.com/kubernetes/minikube/issues/new/choose
legal90 commented 4 years ago

@LukeCarrier I found what's the reason of this. Unlike docker-machine, minikube doesn't actually do RPC calls of PreCreateCheck, Create and other methods from our driver. Instead, it calls them from the vendored dependency (as a library), which is still locked to v1.3.0: https://github.com/kubernetes/minikube/blob/a282354419135221325414c1d8d03f3bd37b58e3/go.mod#L8

That's why you still see this issue and the old-styled text in logs. @medyagh, could you please tell if it's the expected behavior? If so - it looks weird that minikube requires the user to install the driver binary to PATH, but doesn't actually use it 🤔

legal90 commented 4 years ago

@LukeCarrier @medyagh I found the root cause of this issue on minikube side and submitted the fix: https://github.com/kubernetes/minikube/pull/9494

LukeCarrier commented 4 years ago

@legal90 thanks for the prompt follow up, really appreciate it. These integrations are a large part of the reason I became a customer so it’s great to see they’re so well maintained.

legal90 commented 4 years ago

The final fix is released in minikube v1.15.0: https://github.com/kubernetes/minikube/releases/tag/v1.15.0

Please note that starting since v1.15.0 minikube has the parallels driver built-in, so you don't need a separate binary docker-machine-driver-parallels for minikube anymore. (ref: https://github.com/kubernetes/minikube/pull/9517)