fmt
This commit is contained in:
parent
98a52c296c
commit
06144cf287
|
@ -8,8 +8,8 @@ import (
|
|||
// Artifact is the result of running the Qemu builder, namely a set
|
||||
// of files associated with the resulting machine.
|
||||
type Artifact struct {
|
||||
dir string
|
||||
f []string
|
||||
dir string
|
||||
f []string
|
||||
state map[string]interface{}
|
||||
}
|
||||
|
||||
|
|
|
@ -500,8 +500,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|||
}
|
||||
|
||||
artifact := &Artifact{
|
||||
dir: b.config.OutputDir,
|
||||
f: files,
|
||||
dir: b.config.OutputDir,
|
||||
f: files,
|
||||
state: make(map[string]interface{}),
|
||||
}
|
||||
|
||||
|
|
|
@ -27,9 +27,9 @@ func (s *stepCopyDisk) Run(state multistep.StateBag) multistep.StepAction {
|
|||
path,
|
||||
}
|
||||
|
||||
if config.DiskImage == false {
|
||||
return multistep.ActionContinue
|
||||
}
|
||||
if config.DiskImage == false {
|
||||
return multistep.ActionContinue
|
||||
}
|
||||
|
||||
ui.Say("Copying hard drive...")
|
||||
if err := driver.QemuImg(command...); err != nil {
|
||||
|
|
|
@ -26,9 +26,9 @@ func (s *stepCreateDisk) Run(state multistep.StateBag) multistep.StepAction {
|
|||
fmt.Sprintf("%vM", config.DiskSize),
|
||||
}
|
||||
|
||||
if config.DiskImage == true {
|
||||
return multistep.ActionContinue
|
||||
}
|
||||
if config.DiskImage == true {
|
||||
return multistep.ActionContinue
|
||||
}
|
||||
|
||||
ui.Say("Creating hard drive...")
|
||||
if err := driver.QemuImg(command...); err != nil {
|
||||
|
|
|
@ -25,9 +25,9 @@ func (s *stepResizeDisk) Run(state multistep.StateBag) multistep.StepAction {
|
|||
fmt.Sprintf("%vM", config.DiskSize),
|
||||
}
|
||||
|
||||
if config.DiskImage == false {
|
||||
return multistep.ActionContinue
|
||||
}
|
||||
if config.DiskImage == false {
|
||||
return multistep.ActionContinue
|
||||
}
|
||||
|
||||
ui.Say("Resizing hard drive...")
|
||||
if err := driver.QemuImg(command...); err != nil {
|
||||
|
|
|
@ -29,7 +29,7 @@ func (p *LibVirtProvider) Process(ui packer.Ui, artifact packer.Artifact, dir st
|
|||
format := artifact.State("diskType").(string)
|
||||
origSize := artifact.State("diskSize").(uint64)
|
||||
size := origSize / 1024 // In MB, want GB
|
||||
if origSize % 1024 > 0 {
|
||||
if origSize%1024 > 0 {
|
||||
// Make sure we don't make the size smaller
|
||||
size++
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue