Skip to content
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

Merged
merged 4 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .web-docs/components/builder/qemu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,16 @@ necessary for this build to succeed and can be found further down the page.
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/)
does not include WHPX support and users may need to compile or source a
build of QEMU for Windows themselves with WHPX support.

NOTE: HAXM is discontinued, and as of Qemu 8.0, the option is deprecated,
~> HAXM is discontinued, and as of Qemu 8.0, the option is deprecated,
please consider using another accelerator.

-> As an alternative to setting `accelerator`, you can set the `machine` and `accel` args
directly using `qemuargs`. For example, to try potential accelerators in order, you could
use the following:
```hcl
qemuargs = [
["-machine", "type=q35,accel=hvf:kvm:whpx:tcg"],
]

- `disk_additional_size` ([]string) - Additional disks to create. Uses `vm_name` as the disk name template and
appends `-#` where `#` is the position in the array. `#` starts at 1 since 0
Expand Down
14 changes: 9 additions & 5 deletions builder/qemu/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,16 @@ 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/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this removed?

Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp Apr 28, 2023

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

// does not include WHPX support and users may need to compile or source a
// build of QEMU for Windows themselves with WHPX support.
//
// NOTE: HAXM is discontinued, and as of Qemu 8.0, the option is deprecated,
// ~> HAXM is discontinued, and as of Qemu 8.0, the option is deprecated,
// please consider using another accelerator.
//
// -> As an alternative to setting `accelerator`, you can set the `machine` and `accel` args
// directly using `qemuargs`. For example, to try potential accelerators in order, you could
// use the following:
// ```hcl
// qemuargs = [
// ["-machine", "type=q35,accel=hvf:kvm:whpx:tcg"],
// ]
Accelerator string `mapstructure:"accelerator" required:"false"`
// Additional disks to create. Uses `vm_name` as the disk name template and
// appends `-#` where `#` is the position in the array. `#` starts at 1 since 0
Expand Down
14 changes: 9 additions & 5 deletions docs-partials/builder/qemu/Config-not-required.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@
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/)
does not include WHPX support and users may need to compile or source a
build of QEMU for Windows themselves with WHPX support.

NOTE: HAXM is discontinued, and as of Qemu 8.0, the option is deprecated,
~> HAXM is discontinued, and as of Qemu 8.0, the option is deprecated,
please consider using another accelerator.

-> As an alternative to setting `accelerator`, you can set the `machine` and `accel` args
directly using `qemuargs`. For example, to try potential accelerators in order, you could
use the following:
```hcl
qemuargs = [
["-machine", "type=q35,accel=hvf:kvm:whpx:tcg"],
]

- `disk_additional_size` ([]string) - Additional disks to create. Uses `vm_name` as the disk name template and
appends `-#` where `#` is the position in the array. `#` starts at 1 since 0
Expand Down