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.
type Config ¶
type Config struct { common.PackerConfig `mapstructure:",squash"` common.HTTPConfig `mapstructure:",squash"` common.ISOConfig `mapstructure:",squash"` bootcommand.VNCConfig `mapstructure:",squash"` Comm communicator.Config `mapstructure:",squash"` common.FloppyConfig `mapstructure:",squash"` ISOSkipCache bool `mapstructure:"iso_skip_cache"` Accelerator string `mapstructure:"accelerator"` DiskInterface string `mapstructure:"disk_interface"` DiskSize uint `mapstructure:"disk_size"` DiskCache string `mapstructure:"disk_cache"` DiskDiscard string `mapstructure:"disk_discard"` DetectZeroes string `mapstructure:"disk_detect_zeroes"` SkipCompaction bool `mapstructure:"skip_compaction"` DiskCompression bool `mapstructure:"disk_compression"` Format string `mapstructure:"format"` Headless bool `mapstructure:"headless"` DiskImage bool `mapstructure:"disk_image"` UseBackingFile bool `mapstructure:"use_backing_file"` 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"` UseDefaultDisplay bool `mapstructure:"use_default_display"` VNCBindAddress string `mapstructure:"vnc_bind_address"` 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"` 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 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
Click to show internal directories.
Click to hide internal directories.