-
Notifications
You must be signed in to change notification settings - Fork 51
Create initial snapshot after cleanup #20
Copy link
Copy link
Closed
Labels
enhancementEnhancementEnhancement
Description
Description
Create an initial snapshot of the newly created VM after the clean-up step.
Use Case(s)
- if you need to return frequently to a clean state of the VM (right after the initial setup) e.g. to clear files / malware / misconfigurations, the initial snapshot to return to can be shipped right with the VM so the user doesn't have to create it on its own and potentially forget it.
Potential configuration
- add a create snapshot step after the
StepCleanVMXfor the respective builder
&vmwcommon.StepCreateSnapshot{
SnapshotName: &b.config.SnapshotName,
},
- add
SnapshotName stringmapstructure:"snapshot_name" required:"false"`` to the builders config to be able to specify the snapshots name in the config - add a
builder/vmware/common/step_create_snapshot.gowhich creates a snapshot if the name is provided in the config
type StepCreateSnapshot struct {
SnapshotName *string
}
- add a
CreateSnapshotmethod inside the drivers which callsvmrun.exeor equivalent tool on linux / macos to create a snapshot - add Tests
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementEnhancementEnhancement