Skip to content

Commit c2abd42

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 4f5aa02 commit c2abd42

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
@@ -131,8 +131,10 @@ func New(instName string, stdout io.Writer, sigintCh chan os.Signal, opts ...Opt
131131
virtioPort = filenames.VirtioPort
132132
}
133133

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

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