|
|
|
|
@ -93,7 +93,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
|
|
|
|
|
errs = packer.MultiErrorAppend(errs, b.config.ShutdownConfig.Prepare(&b.config.ctx)...)
|
|
|
|
|
errs = packer.MultiErrorAppend(errs, b.config.SSHConfig.Prepare(&b.config.ctx)...)
|
|
|
|
|
errs = packer.MultiErrorAppend(errs, b.config.ToolsConfig.Prepare(&b.config.ctx)...)
|
|
|
|
|
errs = packer.MultiErrorAppend(errs, b.config.VMXConfig.Prepare(&b.config.ctx, b.config.RemoteType)...)
|
|
|
|
|
errs = packer.MultiErrorAppend(errs, b.config.VMXConfig.Prepare(&b.config.ctx)...)
|
|
|
|
|
|
|
|
|
|
if b.config.DiskName == "" {
|
|
|
|
|
b.config.DiskName = "disk"
|
|
|
|
|
@ -171,12 +171,10 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Determine if DiskSize is able to be allocated, only when running locally
|
|
|
|
|
if b.config.RemoteType == "" {
|
|
|
|
|
if err = common.AvailableDisk(uint64(b.config.DiskSize)); err != nil {
|
|
|
|
|
errs = packer.MultiErrorAppend(errs,
|
|
|
|
|
fmt.Errorf("Unavailable Resources: %s", err))
|
|
|
|
|
}
|
|
|
|
|
// Determine if DiskSize is able to be allocated
|
|
|
|
|
if err = common.AvailableDisk(uint64(b.config.DiskSize)); err != nil {
|
|
|
|
|
errs = packer.MultiErrorAppend(errs,
|
|
|
|
|
fmt.Errorf("Unavailable Resources: %s", err))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Warnings
|
|
|
|
|
|