Skip to content

Commit 4b3a0fa

Browse files
committed
Regenerate the cloud-config.yaml on reset
Signed-off-by: Anders F Björklund <[email protected]>
1 parent 62727a9 commit 4b3a0fa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/limactl/factory-reset.go

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"path/filepath"
77
"strings"
88

9+
"github.com/lima-vm/lima/pkg/cidata"
910
"github.com/lima-vm/lima/pkg/instance"
1011
"github.com/lima-vm/lima/pkg/store"
1112
"github.com/lima-vm/lima/pkg/store/filenames"
@@ -63,6 +64,11 @@ func factoryResetAction(_ *cobra.Command, args []string) error {
6364
}
6465
}
6566
}
67+
// Regenerate the cloud-config.yaml, to reflect any changes to the global _config
68+
if err := cidata.GenerateCloudConfig(inst.Dir, instName, inst.Config); err != nil {
69+
logrus.Error(err)
70+
}
71+
6672
logrus.Infof("Instance %q has been factory reset", instName)
6773
return nil
6874
}

0 commit comments

Comments
 (0)