Skip to content

fix(VM): rendergpu name missing for first VM#2628

Merged
limetech merged 1 commit into
unraid:masterfrom
SimonFair:7.3-VM-Fix
May 4, 2026
Merged

fix(VM): rendergpu name missing for first VM#2628
limetech merged 1 commit into
unraid:masterfrom
SimonFair:7.3-VM-Fix

Conversation

@SimonFair

@SimonFair SimonFair commented May 1, 2026

Copy link
Copy Markdown
Contributor

The the first VM in the list the rendergpu name is missing if it is set to a specific GPU.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed GPU device initialization order to prevent undefined behavior and ensure proper GPU configuration handling.
  • Performance

    • Optimized GPU device processing by eliminating redundant recalculation of device data.

@coderabbitai

coderabbitai Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5602a6e1-c4f2-4aa1-9335-f07be14abbb1

📥 Commits

Reviewing files that changed from the base of the PR and between ef1f4d6 and b3c2780.

📒 Files selected for processing (1)
  • emhttp/plugins/dynamix.vm.manager/include/VMMachines.php

Walkthrough

GPU device initialization in a VM manager PHP file is optimized by computing the GPU device list earlier and conditionally based on configuration presence. Variable $vrtmodel is explicitly initialized to prevent undefined reference errors in render-driver logic. The subsequent GPU block now reuses the precomputed list instead of recalculating it.

Changes

Cohort / File(s) Summary
GPU Device Initialization
emhttp/plugins/dynamix.vm.manager/include/VMMachines.php
GPU device data ($arrValidGPUDevices) is now conditionally computed earlier in the execution flow. Variable $vrtmodel is explicitly initialized before virtio3d render-driver logic to prevent undefined reference issues. Later GPU rendering uses the precomputed device list rather than recalculating.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A GPU list computed with care,
Initialized early, placed just there—
No recalculation on each pass,
Variables set before they're asked!
Virtio3d logic runs so clean,
The finest optimization I've seen! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(VM): rendergpu name missing for first VM' directly addresses the main issue being fixed in the PR—a missing rendergpu name for the first VM in the list.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Review rate limit: 4/5 reviews remaining, refill in 12 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown

🔧 PR Test Plugin Available

A test plugin has been generated for this PR that includes the modified files.

Version: 2026.05.01.0858
Build: View Workflow Run

📥 Installation Instructions:

Install via Unraid Web UI:

  1. Go to Plugins → Install Plugin
  2. Copy and paste this URL:
https://preview.dl.unraid.net/pr-plugins/pr-2628/webgui-pr-2628.plg
  1. Click Install

Alternative: Direct Download

⚠️ Important Notes:

  • Testing only: This plugin is for testing PR changes
  • Backup included: Original files are automatically backed up
  • Easy removal: Files are restored when plugin is removed
  • Conflicts: Remove this plugin before installing production updates
  • Post-merge behavior: This preview stays available after merge until preview storage expires or it is manually cleaned up

📝 Modified Files:

Click to expand file list
emhttp/plugins/dynamix.vm.manager/include/VMMachines.php

🔄 To Remove:

Navigate to Plugins → Installed Plugins and remove webgui-pr-2628, or run:

plugin remove webgui-pr-2628

🤖 This comment is automatically generated and will be updated with each new push to this PR.

@SimonFair SimonFair marked this pull request as ready for review May 1, 2026 09:22
@SimonFair SimonFair added the 7.3 label May 1, 2026
@limetech limetech merged commit 6929541 into unraid:master May 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants