builder/qemu: get rid of unnecessary step
This commit is contained in:
parent
e982eb38dc
commit
385a338354
|
@ -387,7 +387,6 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|||
Files: b.config.FloppyFiles,
|
||||
},
|
||||
new(stepCreateDisk),
|
||||
new(stepSuppressMessages),
|
||||
new(stepHTTPServer),
|
||||
new(stepForwardSSH),
|
||||
new(stepConfigureVNC),
|
||||
|
|
|
@ -28,10 +28,6 @@ type Driver interface {
|
|||
// Stop stops a running machine, forcefully.
|
||||
Stop(string) error
|
||||
|
||||
// SuppressMessages should do what needs to be done in order to
|
||||
// suppress any annoying popups, if any.
|
||||
SuppressMessages() error
|
||||
|
||||
// Qemu executes the given command via qemu-system-x86_64
|
||||
Qemu(vmName string, qemuArgs ...string) error
|
||||
|
||||
|
@ -95,10 +91,6 @@ func (d *QemuDriver) Stop(name string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (d *QemuDriver) SuppressMessages() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *QemuDriver) Qemu(vmName string, qemuArgs ...string) error {
|
||||
var stdout, stderr bytes.Buffer
|
||||
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
package qemu
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/mitchellh/multistep"
|
||||
"github.com/mitchellh/packer/packer"
|
||||
"log"
|
||||
)
|
||||
|
||||
// This step sets some variables in Qemu so that annoying
|
||||
// pop-up messages don't exist.
|
||||
type stepSuppressMessages struct{}
|
||||
|
||||
func (stepSuppressMessages) Run(state multistep.StateBag) multistep.StepAction {
|
||||
driver := state.Get("driver").(Driver)
|
||||
ui := state.Get("ui").(packer.Ui)
|
||||
|
||||
log.Println("Suppressing messages in Qemu")
|
||||
if err := driver.SuppressMessages(); err != nil {
|
||||
err := fmt.Errorf("Error configuring Qemu to suppress messages: %s", err)
|
||||
state.Put("error", err)
|
||||
ui.Error(err.Error())
|
||||
return multistep.ActionHalt
|
||||
}
|
||||
|
||||
return multistep.ActionContinue
|
||||
}
|
||||
|
||||
func (stepSuppressMessages) Cleanup(state multistep.StateBag) {}
|
Loading…
Reference in New Issue