qemu

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2016 License: MPL-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const BuilderId = "transcend.qemu"
View Source
const KeyLeftShift uint32 = 0xFFE1

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	// contains filtered or unexported fields
}

Artifact is the result of running the Qemu builder, namely a set of files associated with the resulting machine.

func (*Artifact) BuilderId

func (*Artifact) BuilderId() string

func (*Artifact) Destroy

func (a *Artifact) Destroy() error

func (*Artifact) Files

func (a *Artifact) Files() []string

func (*Artifact) Id

func (*Artifact) Id() string

func (*Artifact) State added in v0.7.2

func (a *Artifact) State(name string) interface{}

func (*Artifact) String

func (a *Artifact) String() string

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func (*Builder) Cancel

func (b *Builder) Cancel()

func (*Builder) Prepare

func (b *Builder) Prepare(raws ...interface{}) ([]string, error)

func (*Builder) Run

func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packer.Artifact, error)

type Config added in v0.8.0

type Config struct {
	common.PackerConfig `mapstructure:",squash"`
	common.HTTPConfig   `mapstructure:",squash"`
	common.ISOConfig    `mapstructure:",squash"`
	Comm                communicator.Config `mapstructure:",squash"`

	ISOSkipCache    bool       `mapstructure:"iso_skip_cache"`
	Accelerator     string     `mapstructure:"accelerator"`
	BootCommand     []string   `mapstructure:"boot_command"`
	DiskInterface   string     `mapstructure:"disk_interface"`
	DiskSize        uint       `mapstructure:"disk_size"`
	DiskCache       string     `mapstructure:"disk_cache"`
	DiskDiscard     string     `mapstructure:"disk_discard"`
	SkipCompaction  bool       `mapstructure:"skip_compaction"`
	DiskCompression bool       `mapstructure:"disk_compression"`
	FloppyFiles     []string   `mapstructure:"floppy_files"`
	Format          string     `mapstructure:"format"`
	Headless        bool       `mapstructure:"headless"`
	DiskImage       bool       `mapstructure:"disk_image"`
	MachineType     string     `mapstructure:"machine_type"`
	NetDevice       string     `mapstructure:"net_device"`
	OutputDir       string     `mapstructure:"output_directory"`
	QemuArgs        [][]string `mapstructure:"qemuargs"`
	QemuBinary      string     `mapstructure:"qemu_binary"`
	ShutdownCommand string     `mapstructure:"shutdown_command"`
	SSHHostPortMin  uint       `mapstructure:"ssh_host_port_min"`
	SSHHostPortMax  uint       `mapstructure:"ssh_host_port_max"`
	VNCPortMin      uint       `mapstructure:"vnc_port_min"`
	VNCPortMax      uint       `mapstructure:"vnc_port_max"`
	VMName          string     `mapstructure:"vm_name"`

	// These are deprecated, but we keep them around for BC
	// TODO(@mitchellh): remove
	SSHWaitTimeout time.Duration `mapstructure:"ssh_wait_timeout"`

	// TODO(mitchellh): deprecate
	RunOnce bool `mapstructure:"run_once"`

	RawBootWait        string `mapstructure:"boot_wait"`
	RawShutdownTimeout string `mapstructure:"shutdown_timeout"`
	// contains filtered or unexported fields
}

type Driver

type Driver interface {
	// Stop stops a running machine, forcefully.
	Stop() error

	// Qemu executes the given command via qemu-system-x86_64
	Qemu(qemuArgs ...string) error

	// wait on shutdown of the VM with option to cancel
	WaitForShutdown(<-chan struct{}) bool

	// Qemu executes the given command via qemu-img
	QemuImg(...string) error

	// Verify checks to make sure that this driver should function
	// properly. If there is any indication the driver can't function,
	// this will return an error.
	Verify() error

	// Version reads the version of Qemu that is installed.
	Version() (string, error)
}

A driver is able to talk to qemu-system-x86_64 and perform certain operations with it.

type DriverCancelCallback

type DriverCancelCallback func(state multistep.StateBag) bool

type QemuDriver

type QemuDriver struct {
	QemuPath    string
	QemuImgPath string
	// contains filtered or unexported fields
}

func (*QemuDriver) Qemu

func (d *QemuDriver) Qemu(qemuArgs ...string) error

func (*QemuDriver) QemuImg

func (d *QemuDriver) QemuImg(args ...string) error

func (*QemuDriver) Stop

func (d *QemuDriver) Stop() error

func (*QemuDriver) Verify

func (d *QemuDriver) Verify() error

func (*QemuDriver) Version

func (d *QemuDriver) Version() (string, error)

func (*QemuDriver) WaitForShutdown

func (d *QemuDriver) WaitForShutdown(cancelCh <-chan struct{}) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL