|
6 | 6 | "time"
|
7 | 7 |
|
8 | 8 | "github.com/lima-vm/lima/pkg/limayaml"
|
9 |
| - "github.com/lima-vm/lima/pkg/store/filenames" |
10 | 9 | "github.com/lima-vm/sshocker/pkg/ssh"
|
11 | 10 | "github.com/sirupsen/logrus"
|
12 | 11 | )
|
|
120 | 119 | debugHint: `Append "user_allow_other" to /etc/fuse.conf (/etc/fuse3.conf) in the guest`,
|
121 | 120 | })
|
122 | 121 | }
|
123 |
| - if a.vSockPort != 0 { |
124 |
| - req = append(req, requirement{ |
125 |
| - description: "the guest agent to be running", |
126 |
| - script: fmt.Sprintf(`#!/bin/bash |
127 |
| -set -eux -o pipefail |
128 |
| -if ! timeout 30s bash -c "until ss -a -n --vsock --listen | grep -q ':%d'; do sleep 3; done"; then |
129 |
| - echo >&2 "lima-guestagent is not installed yet" |
130 |
| - exit 1 |
131 |
| -fi |
132 |
| -`, a.vSockPort), |
133 |
| - debugHint: fmt.Sprintf(`The guest agent with vsockPort %d does not seem running. |
134 |
| -Make sure that you are using an officially supported image. |
135 |
| -Also see "/var/log/cloud-init-output.log" in the guest. |
136 |
| -A possible workaround is to run "lima-guestagent install-systemd" in the guest. |
137 |
| -`, a.vSockPort), |
138 |
| - }) |
139 |
| - } else { |
140 |
| - req = append(req, requirement{ |
141 |
| - description: "the guest agent to be running", |
142 |
| - script: fmt.Sprintf(`#!/bin/bash |
143 |
| -set -eux -o pipefail |
144 |
| -sock="/dev/virtio-ports/%s" |
145 |
| -if ! timeout 30s bash -c "until sudo fuser \"${sock}\" || sudo lsof \"${sock}\"; do sleep 3; done"; then |
146 |
| - echo >&2 "lima-guestagent is not installed yet" |
147 |
| - exit 1 |
148 |
| -fi |
149 |
| -`, filenames.VirtioPort), |
150 |
| - debugHint: fmt.Sprintf(`The guest agent with serialport /dev/virtio-ports/%s does not seem running. |
151 |
| -Make sure that you are using an officially supported image. |
152 |
| -Also see "/var/log/cloud-init-output.log" in the guest. |
153 |
| -A possible workaround is to run "lima-guestagent install-systemd" in the guest. |
154 |
| -`, filenames.VirtioPort), |
155 |
| - }) |
156 |
| - } |
157 | 122 | return req
|
158 | 123 | }
|
159 | 124 |
|
|
0 commit comments