Skip to content

Commit 7b2e56d

Browse files
committed
Don't generate cidata.iso for external vm
It is not using cloud-init anyway, and does not need another copy of lima-guestagent and nerdctl-full.tgz Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
1 parent 95eb85c commit 7b2e56d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/hostagent/hostagent.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ func New(instName string, stdout io.Writer, signalCh chan os.Signal, opts ...Opt
133133
virtioPort = "" // filenames.VirtioPort
134134
}
135135

136-
if err := cidata.GenerateISO9660(inst.Dir, instName, y, udpDNSLocalPort, tcpDNSLocalPort, o.nerdctlArchive, vSockPort, virtioPort); err != nil {
137-
return nil, err
136+
if *y.VMType != limayaml.EXT {
137+
if err := cidata.GenerateISO9660(inst.Dir, instName, y, udpDNSLocalPort, tcpDNSLocalPort, o.nerdctlArchive, vSockPort, virtioPort); err != nil {
138+
return nil, err
139+
}
138140
}
139141

140142
sshOpts, err := sshutil.SSHOpts(inst.Dir, *y.SSH.LoadDotSSHPubKeys, *y.SSH.Address, *y.SSH.ForwardAgent, *y.SSH.ForwardX11, *y.SSH.ForwardX11Trusted)

0 commit comments

Comments
 (0)