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 ¶ added in v0.8.0
type Config struct {
common.PackerConfig `mapstructure:",squash"`
Comm communicator.Config `mapstructure:",squash"`
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"`
FloppyFiles []string `mapstructure:"floppy_files"`
Format string `mapstructure:"format"`
Headless bool `mapstructure:"headless"`
DiskImage bool `mapstructure:"disk_image"`
HTTPDir string `mapstructure:"http_directory"`
HTTPPortMin uint `mapstructure:"http_port_min"`
HTTPPortMax uint `mapstructure:"http_port_max"`
ISOChecksum string `mapstructure:"iso_checksum"`
ISOChecksumType string `mapstructure:"iso_checksum_type"`
ISOUrls []string `mapstructure:"iso_urls"`
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
SSHKeyPath string `mapstructure:"ssh_key_path"`
SSHWaitTimeout time.Duration `mapstructure:"ssh_wait_timeout"`
// TODO(mitchellh): deprecate
RunOnce bool `mapstructure:"run_once"`
RawBootWait string `mapstructure:"boot_wait"`
RawSingleISOUrl string `mapstructure:"iso_url"`
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.