Skip to content

Commit

Permalink
Regenerate the cloud-config.yaml on reset
Browse files Browse the repository at this point in the history
Signed-off-by: Anders F Björklund <[email protected]>
  • Loading branch information
afbjorklund committed Oct 14, 2024
1 parent 62727a9 commit 4b3a0fa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/limactl/factory-reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"path/filepath"
"strings"

"github.com/lima-vm/lima/pkg/cidata"
"github.com/lima-vm/lima/pkg/instance"
"github.com/lima-vm/lima/pkg/store"
"github.com/lima-vm/lima/pkg/store/filenames"
Expand Down Expand Up @@ -63,6 +64,11 @@ func factoryResetAction(_ *cobra.Command, args []string) error {
}
}
}
// Regenerate the cloud-config.yaml, to reflect any changes to the global _config
if err := cidata.GenerateCloudConfig(inst.Dir, instName, inst.Config); err != nil {
logrus.Error(err)
}

logrus.Infof("Instance %q has been factory reset", instName)
return nil
}
Expand Down

0 comments on commit 4b3a0fa

Please sign in to comment.