vm-repair scripts: fix resource-disk exclusion and add Linux NVMe readiness detection - #145
Merged
Merged
Conversation
Edwin Bernal Microsoft (EdwinBernal1)
requested a review
from Haider Agha (haagha)
September 8, 2026 15:39
Haider Agha (haagha)
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Azure resource-disk exclusion in the NVMe-aware Windows disk-discovery helper and adds a read-only Linux detector for SCSI-to-NVMe boot readiness.
The resource disk is reported as
SASon current Azure repair VMs, not the literalSCSI, and PowerShell 5.1 returns a scalar for a single partition. The old check therefore treated the temporary resource disk as a repair target. The fix recognizes the SCSI-family bus types and array-wraps partition results before counting them.The new
linux-detect-nvme-readinessrun-id mounts the attached root filesystem read-only and reports unstable device references, NVMe-driver presence in the newest initramfs, dracut host-only configuration, distro identity, attached-disk transports, and one machine-readable[NVME-EVIDENCE-JSON]record. It does not modify the attached OS disk.Requested by / source
NVMe-PR-Scripts.mdType
Changes
src/windows/common/helpers/Get-Disk-Partitions-v3.ps1SCSI,SAS, andRAIDas the SCSI family when excluding the Azure resource disk.Get-Partitionoutput before counting it.tests/test-get-disk-partitions-v3.ps1src/linux/linux-detect-nvme-readiness.shbash -ebehavior.map.jsonlinux-detect-nvme-readiness.Version & changelog
repair-script-library, not the versioned Azure CLI extension package.Testing
Completed locally
origin/main(0df7fa7, merge of PR vm-repair scripts: add read-only win-detect-nvme-readiness detection script #144)origin/main: resource disk is returned and the test finds two targetsF:remainsgit diff --check origin/main...HEADbash -n src/linux/linux-detect-nvme-readiness.shmap.jsonparsesCross-repo impact
linux-detect-nvme-readiness.list-scriptsreadsmap.json.NVMe-PR-Extension.md.Security review
-o roand contains no write operation against that filesystem.eval,bash -c,sh -c, command construction from untrusted input, credential logging, secrets, or customer data were introduced.Backward compatibility
linux-detect-nvme-readinessis additive and read-only.