Skip to content

Commit 08027b1

Browse files
committed
Regenerate the cloud-config.yaml on start
It was already generated by "create", but it might have changed since. So make sure that it is updated by "start". It is up to the user if they already used this file, and if so they need to update the file for the next boot too. Signed-off-by: Anders F Björklund <[email protected]>
1 parent ede3346 commit 08027b1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/hostagent/hostagent.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ func New(instName string, stdout io.Writer, signalCh chan os.Signal, opts ...Opt
133133
virtioPort = "" // filenames.VirtioPort
134134
}
135135

136+
if err := cidata.GenerateCloudConfig(inst.Dir, instName, inst.Config); err != nil {
137+
return nil, err
138+
}
136139
if err := cidata.GenerateISO9660(inst.Dir, instName, inst.Config, udpDNSLocalPort, tcpDNSLocalPort, o.nerdctlArchive, vSockPort, virtioPort); err != nil {
137140
return nil, err
138141
}

0 commit comments

Comments
 (0)