You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Qemu supports specifying several accelerators, in precedence order, so that one can specify a list of accelerators to use, and let qemu decide which is the one that can apply to the current context.
One such use-case would be for example templates that can be invoked in different contexts.
If using windows, we'd want to use WHPX, on Linux we'd want KVM, and something else (probably TCG) on other platforms.
Right now, the best way to support this would be to set the accelerator as an input variable, or to read it from the environment, then invoke Packer with the template, and use the appropriate accelerator for the platform.
What this issue suggests is adding a list of accelerators, in addition to the accelerator attribute we already have, in order to specify this list once, and have qemu pick which one applies to the current environment.
This would yield a command such as qemu-system-x86_64 -accel "whpx" -accel "kvm" -accel "tcg" [...], which in turn would lead to qemu trying each accelerator in succession, and picking the first one it supports in the current environment.
For example on a Linux x86_64 system:
qemu-system-x86_64: -accel whpx: invalid accelerator whpx
qemu-system-x86_64: falling back to KVM
[...]
Qemu supports specifying several accelerators, in precedence order, so that one can specify a list of accelerators to use, and let qemu decide which is the one that can apply to the current context.
One such use-case would be for example templates that can be invoked in different contexts.
If using windows, we'd want to use WHPX, on Linux we'd want KVM, and something else (probably TCG) on other platforms.
Right now, the best way to support this would be to set the accelerator as an input variable, or to read it from the environment, then invoke Packer with the template, and use the appropriate accelerator for the platform.
What this issue suggests is adding a list of accelerators, in addition to the
accelerator
attribute we already have, in order to specify this list once, and have qemu pick which one applies to the current environment.Example configuration
This would yield a command such as
qemu-system-x86_64 -accel "whpx" -accel "kvm" -accel "tcg" [...]
, which in turn would lead toqemu
trying each accelerator in succession, and picking the first one it supports in the current environment.For example on a Linux x86_64 system:
Discussed in PR #119
The text was updated successfully, but these errors were encountered: