Add Intel HAXM support to QEMU builder

This commit is contained in:
Glenn McDonald 2017-12-29 11:51:57 +11:00
parent ab69f619e5
commit 7250c4f7f0
2 changed files with 5 additions and 4 deletions

View File

@ -25,6 +25,7 @@ var accels = map[string]struct{}{
"kvm": {},
"tcg": {},
"xen": {},
"hax": {},
}
var netDevice = map[string]bool{
@ -259,7 +260,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
if _, ok := accels[b.config.Accelerator]; !ok {
errs = packer.MultiErrorAppend(
errs, errors.New("invalid accelerator, only 'kvm', 'tcg', 'xen', or 'none' are allowed"))
errs, errors.New("invalid accelerator, only 'kvm', 'tcg', 'xen', 'hax', or 'none' are allowed"))
}
if _, ok := netDevice[b.config.NetDevice]; !ok {

View File

@ -110,9 +110,9 @@ Linux server and have not enabled X11 forwarding (`ssh -X`).
### Optional:
- `accelerator` (string) - The accelerator type to use when running the VM.
This may be `none`, `kvm`, `tcg`, or `xen`. The appropriate software must
already been installed on your build machine to use the accelerator you
specified. When no accelerator is specified, Packer will try to use `kvm`
This may be `none`, `kvm`, `tcg`, `hax`, or `xen`. The appropriate software
must have already been installed on your build machine to use the accelerator
you specified. When no accelerator is specified, Packer will try to use `kvm`
if it is available but will default to `tcg` otherwise.
- `boot_command` (array of strings) - This is an array of commands to type