collect vm screenshot throws error after vm is off
Open
Nobody has claimed this yet.
bug
testing
- Dominant language
- Rust
- Stars
- 1.9k
- Forks
- 238
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 100
Description
... this error noise is confusing:
https://github.com/microsoft/openvmm/actions/runs/18592557887/job/53012618778?pr=2198
[ petri] 2025-10-17T12:54:09.168098Z DEBUG petri: command exited in 1.127s with status exit code: 0 cmd="\"powershell.exe\" \"-NoProfile\" \"Import-Module\" \"\\\"C:\\\\Windows\\\\SystemTemp\\\\.tmpDjRmW8\\\\hyperv.psm1\\\"\" \";\" \"Get-VM\" \"-Id\" \"\\\"4cb79f6b-1841-444d-8070-8653f7ba59da\\\"\" \"|\" \"Get-VmScreenshot\" \"-Path\" \"\\\"C:\\\\Windows\\\\SystemTemp\\\\.tmpDjRmW8\\\\screenshot.bin\\\"\"" stdout_str=",\r\n" stderr_str="Invoke-CimMethod : Invalid method Parameter(s) \r\nAt C:\\Windows\\SystemTemp\\.tmpDjRmW8\\hyperv.psm1:445 char:22\r\n+ ... e = $vmms | Invoke-CimMethod -MethodName \"GetVirtualSystemThumbnailIm ...\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : NotSpecified: (Msvm_VirtualSys...T-CC-S1523-10\"):CimInstance) [Invoke-CimMethod], CimExc \r\n eption\r\n + FullyQualifiedErrorId : HRESULT 0x8004102f,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand\r\n \r\nException calling \"WriteAllBytes\" with \"2\" argument(s): \"Value cannot be null.\r\nParameter name: bytes\"\r\nAt C:\\Windows\\SystemTemp\\.tmpDjRmW8\\hyperv.psm1:451 char:5\r\n+ [IO.File]::WriteAllBytes($Path, $image.ImageData)\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : NotSpecified: (:) [], MethodInvocationException\r\n + FullyQualifiedErrorId : ArgumentNullException\r\n \r\n"
[ petri] 2025-10-17T12:54:09.168246Z ERROR petri::vm: Failed to take screenshot e=invalid x dimension
Caused by:
cannot parse integer from empty string
Stack backtrace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: <unknown>
10: <unknown>
11: <unknown>
12: <unknown>
13: <unknown>
14: <unknown>
15: <unknown>
16: <unknown>
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked GitHub Actions run and trace the screenshot-collection path around the PowerShell Get-VmScreenshot invocation when the VM is off. Confirm the expected behavior for an unavailable screenshot; done means this condition no longer produces confusing error noise or a follow-on parse failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, rust
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100