Skip to content

Commit e11848a

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 <[email protected]>
1 parent e1d9b66 commit e11848a

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
@@ -136,8 +136,10 @@ func New(instName string, stdout io.Writer, signalCh chan os.Signal, opts ...Opt
136136
virtioPort = "" // filenames.VirtioPort
137137
}
138138

139-
if err := cidata.GenerateISO9660(inst.Dir, instName, y, udpDNSLocalPort, tcpDNSLocalPort, o.nerdctlArchive, vSockPort, virtioPort); err != nil {
140-
return nil, err
139+
if *y.VMType != limayaml.EXT {
140+
if err := cidata.GenerateISO9660(inst.Dir, instName, y, udpDNSLocalPort, tcpDNSLocalPort, o.nerdctlArchive, vSockPort, virtioPort); err != nil {
141+
return nil, err
142+
}
141143
}
142144

143145
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)