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

Enable QEMU Podman machine on Windows #18488

Closed
wants to merge 1 commit into from
Closed
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
11 changes: 11 additions & 0 deletions pkg/machine/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ Note: To run specific test files, add the test files to the end of the winmake c

`./winmake localmachine "basic_test.go start_test.go"`

### QEMU
1. Install QEMU and add it to either user or sysmem PATH variable
1. Install Podman release (needed to have gvproxy binary)
1. Open a powershell as a regular user
1. $env:CONTAINERS_MACHINE_PROVIDER="qemu"
1. `./winmake localmachine`

Note: To run specific test files, add the test files to the end of the winmake command:

`./winmake localmachine "basic_test.go start_test.go"`

## MacOS

### Apple Hypervisor
Expand Down
2 changes: 1 addition & 1 deletion pkg/machine/e2e/config_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
const podmanBinary = "../../../bin/windows/podman.exe"

func getDownloadLocation(p machine.VirtProvider) string {
if p.VMType() == define.HyperVVirt {
if p.VMType() == define.HyperVVirt || p.VMType() == define.QemuVirt {
return getFCOSDownloadLocation(p)
}
fd, err := wsl.NewFedoraDownloader(define.WSLVirt, "", defaultStream.String())
Expand Down
3 changes: 3 additions & 0 deletions pkg/machine/e2e/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ var _ = Describe("podman machine init", func() {
Skip("volumes are not supported on hyperv yet")
}
skipIfWSL("WSL volumes are much different. This test will not pass as is")
if testProvider.VMType() == define.QemuVirt && runtime.GOOS == "windows" {
Skip("volumes are not yet supported on official qemu builds running under Windows")
}

tmpDir, err := os.MkdirTemp("", "")
Expect(err).ToNot(HaveOccurred())
Expand Down
2 changes: 2 additions & 0 deletions pkg/machine/provider/platform_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ func Get() (machine.VirtProvider, error) {
return wsl.VirtualizationProvider(), nil
case define.HyperVVirt:
return hyperv.VirtualizationProvider(), nil
case define.QemuVirt:
return getQemuProvider()
default:
return nil, fmt.Errorf("unsupported virtualization provider: `%s`", resolvedVMType.String())
}
Expand Down
10 changes: 10 additions & 0 deletions pkg/machine/provider/platform_windows_amd64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package provider

import (
"github.com/containers/podman/v4/pkg/machine"
"github.com/containers/podman/v4/pkg/machine/qemu"
)

func getQemuProvider() (machine.VirtProvider, error) {
return qemu.VirtualizationProvider(), nil
}
12 changes: 12 additions & 0 deletions pkg/machine/provider/platform_windows_arm64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package provider

import (
"fmt"

"github.com/containers/podman/v4/pkg/machine"
"github.com/containers/podman/v4/pkg/machine/define"
)

func getQemuProvider() (machine.VirtProvider, error) {
return nil, fmt.Errorf("unsupported virtualization provider: `%s`", define.QemuVirt.String())
}