diff --git a/pkg/machine/e2e/README.md b/pkg/machine/e2e/README.md index 5a1e324a20..30f62f5b2c 100644 --- a/pkg/machine/e2e/README.md +++ b/pkg/machine/e2e/README.md @@ -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 diff --git a/pkg/machine/e2e/config_windows_test.go b/pkg/machine/e2e/config_windows_test.go index d82a7f022d..ce0c3187c8 100644 --- a/pkg/machine/e2e/config_windows_test.go +++ b/pkg/machine/e2e/config_windows_test.go @@ -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()) diff --git a/pkg/machine/e2e/init_test.go b/pkg/machine/e2e/init_test.go index 27b0b3d060..f1750536c8 100644 --- a/pkg/machine/e2e/init_test.go +++ b/pkg/machine/e2e/init_test.go @@ -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()) diff --git a/pkg/machine/provider/platform_windows.go b/pkg/machine/provider/platform_windows.go index a57f283e37..0a4e8773a7 100644 --- a/pkg/machine/provider/platform_windows.go +++ b/pkg/machine/provider/platform_windows.go @@ -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()) } diff --git a/pkg/machine/provider/platform_windows_amd64.go b/pkg/machine/provider/platform_windows_amd64.go new file mode 100644 index 0000000000..113ab2442c --- /dev/null +++ b/pkg/machine/provider/platform_windows_amd64.go @@ -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 +} diff --git a/pkg/machine/provider/platform_windows_arm64.go b/pkg/machine/provider/platform_windows_arm64.go new file mode 100644 index 0000000000..8ec95785d4 --- /dev/null +++ b/pkg/machine/provider/platform_windows_arm64.go @@ -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()) +}