-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Improvement regarding accel on windows #119
docs: Improvement regarding accel on windows #119
Conversation
why is setting the machine_type = "q35"
accelerator = "hvf:kvm:whpx:tcg" ?? |
Ultimately that would be better but its not supported in the current version, you can only set one |
@ciarancourtney I didn't tried and only now I see this code here packer-plugin-qemu/builder/qemu/config.go Lines 810 to 813 in 8ad4058
maybe if we do a simple for _, accelerator := range strings.Split(c.Accelerator, ":") {
if _, ok := accels[accelerator]; !ok {
errs = packersdk.MultiErrorAppend(
errs, errors.New("invalid accelerator, only 'kvm', 'tcg', 'xen', 'hax', 'hvf', 'whpx', or 'none' are allowed"))
}
} probably |
@lbajolet-hashicorp when you get a second could you review and validate the documentation changes. @vheon I don't enough to comment directly on your thoughts to improve the accelerator config settings. Maybe Lucas has thoughts. I recommend opening a separate issue for it so that it can be discussed or a PR to see how things would work. |
@@ -235,9 +235,13 @@ type Config struct { | |||
// add [ "-global", "virtio-pci.disable-modern=on" ] to `qemuargs` depending on the | |||
// guest operating system. | |||
// | |||
// ~> For `whpx`, note that [Stefan Weil's QEMU for Windows distribution](https://qemu.weilnetz.de/w64/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the commit that changes this, WHPX is supported by Stefan Weil's Windows qemu distribution since 2019, so in that sense I tend to agree that this can be removed from our docs.
I cannot test this however since I don't have a Windows machine on hand
This change also requires the execution of |
Regarding the acceleration methods, there's two alternatives that come to mind:
I agree with @nywilken though, this should probably be tracked in a separate issue. Regarding |
- Has been included since 2019
- per https://www.qemu.org/docs/master/system/invocation.html#hxtool-0 - Note that qemu devs plan on deprecating colon syntax in order to apply individual accel options, but solution will be similar https://mail.gnu.org/archive/html/qemu-discuss/2019-11/msg00118.html
The HAXM deprecation notice was only exposed as a "NOTE", where it should be a warning, and the tip for accelerator priority changes was exposed as a warning, where it should have been an info box.
Since the doc changes for the accelerator on the builder, we should add the newer, versioned docs to the repository in order for the upstream docs to be updated as well.
231d6d1
to
d4f11fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ciarancourtney,
Thanks for opening this, and sorry it was left open for so long.
I've taken a new look at the code, rebased it, and re-generated the docs from the changes in the code.
For future reference, if you want to suggest more changes to the documentation later, plase run make generate
so the partials are up-to-date, otherwise we have some actions that will fail.
I'll merge this once tests go green, and we can keep an issue open for the accelerator choices. As pointed out in your commit, the :
notation is now deprecated (refer to this thread for more information), so we should probably consider using multiple -accel
options if/when we want to support this feature.
This being said, thanks again for opening this one @ciarancourtney!
Some docs improvments related to accel arg, particularly on windows hosts