Docs changes & Removed memory and quiesce options from vsphere-template

This commit is contained in:
Julio Tain Sueiras 2018-11-28 11:25:01 -05:00
parent f83b64e603
commit 51053efad2
3 changed files with 4 additions and 17 deletions

View File

@ -34,8 +34,6 @@ type Config struct {
SnapshotEnable bool `mapstructure:"snapshot_enable"` SnapshotEnable bool `mapstructure:"snapshot_enable"`
SnapshotName string `mapstructure:"snapshot_name"` SnapshotName string `mapstructure:"snapshot_name"`
SnapshotDescription string `mapstructure:"snapshot_description"` SnapshotDescription string `mapstructure:"snapshot_description"`
SnapshotMemory bool `mapstructure:"snapshot_memory"`
SnapshotQuiesce bool `mapstructure:"snapshot_quiesce"`
ctx interpolate.Context ctx interpolate.Context
} }

View File

@ -15,8 +15,6 @@ type stepCreateSnapshot struct {
RemoteFolder string RemoteFolder string
SnapshotName string SnapshotName string
SnapshotDescription string SnapshotDescription string
SnapshotMemory bool
SnapshotQuiesce bool
SnapshotEnable bool SnapshotEnable bool
} }
@ -36,8 +34,6 @@ func NewStepCreateSnapshot(artifact packer.Artifact, p *PostProcessor) *stepCrea
SnapshotEnable: p.config.SnapshotEnable, SnapshotEnable: p.config.SnapshotEnable,
SnapshotName: p.config.SnapshotName, SnapshotName: p.config.SnapshotName,
SnapshotDescription: p.config.SnapshotDescription, SnapshotDescription: p.config.SnapshotDescription,
SnapshotMemory: p.config.SnapshotMemory,
SnapshotQuiesce: p.config.SnapshotQuiesce,
} }
} }
@ -47,7 +43,6 @@ func (s *stepCreateSnapshot) Run(_ context.Context, state multistep.StateBag) mu
dcPath := state.Get("dcPath").(string) dcPath := state.Get("dcPath").(string)
if !s.SnapshotEnable { if !s.SnapshotEnable {
ui.Message("Snapshot Not Enabled, Continue...")
return multistep.ActionContinue return multistep.ActionContinue
} }
@ -61,7 +56,7 @@ func (s *stepCreateSnapshot) Run(_ context.Context, state multistep.StateBag) mu
return multistep.ActionHalt return multistep.ActionHalt
} }
task, err := vm.CreateSnapshot(context.Background(), s.SnapshotName, s.SnapshotDescription, s.SnapshotMemory, s.SnapshotQuiesce) task, err := vm.CreateSnapshot(context.Background(), s.SnapshotName, s.SnapshotDescription, false, false)
if err != nil { if err != nil {
state.Put("error", err) state.Put("error", err)

View File

@ -61,20 +61,14 @@ Optional:
- `insecure` (boolean) - If it's true skip verification of server - `insecure` (boolean) - If it's true skip verification of server
certificate. Default is false certificate. Default is false
- `snapshot_enable` (boolean) - Enable snapshot creation before marking as a - `snapshot_enable` (boolean) - Create a snapshot before marking as a
template. Default is false template. Default is false
- `snapshot_name` (string) - Name for the snapshot. - `snapshot_name` (string) - Name for the snapshot.
Require when `snapshot_enable` is enabled Required when `snapshot_enable` is `true`
- `snapshot_description` (string) - Description for the snapshot. - `snapshot_description` (string) - Description for the snapshot.
Require when `snapshot_enable` is enabled Required when `snapshot_enable` is `true`
- `snapshot_memory` (boolean) - Enable memory option for the snapshot.
Default is false
- `snapshot_quiesce` (boolean) - Enable quiesce option for the snapshot.
Default is false
## Using the vSphere Template with local builders ## Using the vSphere Template with local builders