podman-desktop icon indicating copy to clipboard operation
podman-desktop copied to clipboard

Podman Desktop unable to detect the Virtual Machine Platform already enabled

Open zikzakjack opened this issue 1 year ago • 11 comments

Bug description

After uninstalling the older version, I am trying to set up Podman Desktop and Podman on my Windows Laptop. I keep getting the error below on the check requirements screen.

Virtual Machine Platform should be enabled to be able to run Podman.

Operating system

Windows 11

Installation Method

Installer from website/GitHub releases

Version

1.10.2

Steps to reproduce

https://github.com/containers/podman-desktop/discussions/7413

Relevant log output

https://github.com/containers/podman-desktop/discussions/7413

Additional context

https://github.com/containers/podman-desktop/discussions/7413

zikzakjack avatar Jun 01 '24 17:06 zikzakjack

I have almost the same problem. I installed podman desktop for the first time, and it can't detect that I deployed the virtual machine feature.

bodzebod avatar Oct 21 '24 07:10 bodzebod

@bodzebod could you run in powershell command below? What is the output?

(Get-WmiObject -Query "Select * from Win32_OptionalFeature where InstallState = '1'").Name

dgolovin avatar Oct 23 '24 21:10 dgolovin

here it is: Image

For your information, I have posted more details in a similar ticket: https://github.com/containers/podman-desktop/discussions/7413#discussioncomment-11001835

bodzebod avatar Oct 24 '24 08:10 bodzebod

@bodzebod would you do another test and run line below in powershell? It prints out you current encoding used in powershell.

[System.Console]::OutputEncoding

output should look alike to one below

PS C:\p\encoding-test> [System.Console]::OutputEncoding

IsSingleByte      : True
BodyName          : IBM437
EncodingName      : OEM United States
HeaderName        : IBM437
WebName           : IBM437
WindowsCodePage   : 1252
IsBrowserDisplay  : False
IsBrowserSave     : False
IsMailNewsDisplay : False
IsMailNewsSave    : False
EncoderFallback   : System.Text.InternalEncoderBestFitFallback
DecoderFallback   : System.Text.InternalDecoderBestFitFallback
IsReadOnly        : True
CodePage          : 437

Thank you!

dgolovin avatar Oct 26 '24 03:10 dgolovin

Sure, here i is:

[System.Console]::OutputEncoding

IsSingleByte      : True
EncodingName      : Western European (DOS)
WebName           : ibm850
HeaderName        : ibm850
BodyName          : ibm850
Preamble          :
WindowsCodePage   :
IsBrowserDisplay  :
IsBrowserSave     :
IsMailNewsDisplay :
IsMailNewsSave    :
EncoderFallback   : System.Text.InternalEncoderBestFitFallback
DecoderFallback   : System.Text.InternalDecoderBestFitFallback
IsReadOnly        : False
CodePage          : 850

bodzebod avatar Oct 29 '24 08:10 bodzebod

I have tested this use case using code snippet below on Windows 10 and 11. The result is the same it prints out VirtualMachinePlatform constant and true. Exactly the same is happening in production. I assume, for now, that problem was in resolving promise returned from process.exec to early based on process 'exit' event when output streams are not flushed and closed. Stream issue addressed in PR #9654 and going to be included in next release.

IMO we should keep this issue opened for now and let @bodzebod verify it in next release with #9456 included.

const { default: child_process } = await import("node:child_process");
function run () {
    const p = child_process.spawn('powershell', [`[System.Console]::OutputEncoding = [Text.Encoding]::GetEncoding(850); (Get-WmiObject -Query "Select * from Win32_OptionalFeature where InstallState = \'1\'").Name  | select-string VirtualMachinePlatform`],{});
    let stdout = '';
    p.stdout.setEncoding('utf8');
    p.stdout.on('data', data => {
        stdout+=data;
    });
    p.on('close', code => {
        console.log(stdout.toString());
        console.log(stdout.toString().includes('VirtualMachinePlatform'));
    });
}
run();

dgolovin avatar Oct 30 '24 04:10 dgolovin

@bodzebod latest podman release here have a fix for this issue. Could you verify if it works for you now? If it is not, then there is one more fix in pipeline and should be included into the next release.

Thank you!

dgolovin avatar Nov 12 '24 16:11 dgolovin

Still having this issue with the latest build.

Image

vertgo avatar Jun 05 '25 17:06 vertgo

Same issue

Image

Straven avatar Jun 13 '25 09:06 Straven

Re-opening this as there have been two users with the same issue (see above)

cdrage avatar Jun 13 '25 13:06 cdrage

For me helps installing podman manually from https://github.com/containers/podman/releases, and then podman-desktop detects it.

Straven avatar Jun 26 '25 09:06 Straven

@Straven That is definitely a workaround for the problem. Although, we still have the issue to solve.

odockal avatar Jul 01 '25 06:07 odockal

Same bug with Podman Desktop 1.21.0

tux-86 avatar Sep 12 '25 15:09 tux-86