Commit f73ae4ef authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/vmware: seed RNG

parent fd42a21f
...@@ -7,6 +7,7 @@ import ( ...@@ -7,6 +7,7 @@ import (
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer" "github.com/mitchellh/packer/packer"
"log" "log"
"math/rand"
"os" "os"
"path/filepath" "path/filepath"
"time" "time"
...@@ -135,6 +136,9 @@ func (b *Builder) Prepare(raw interface{}) (err error) { ...@@ -135,6 +136,9 @@ func (b *Builder) Prepare(raw interface{}) (err error) {
} }
func (b *Builder) Run(ui packer.Ui, hook packer.Hook) packer.Artifact { func (b *Builder) Run(ui packer.Ui, hook packer.Hook) packer.Artifact {
// Seed the random number generator
rand.Seed(time.Now().UTC().UnixNano())
steps := []multistep.Step{ steps := []multistep.Step{
&stepPrepareOutputDir{}, &stepPrepareOutputDir{},
&stepCreateDisk{}, &stepCreateDisk{},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment