Add PlatformDiskId to VirtualHardDiskProperties - #350
Closed
YuanZh (YuanMSFT) wants to merge 16 commits into
Closed
Conversation
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a PlatformDiskId field to the VirtualHardDiskProperties structure to help customers map ARM resources to attached disks in VMs. The field will store a unique disk identifier that can be retrieved using PowerShell cmdlets in Windows or lsblk in Linux.
- Add PlatformDiskId field to VirtualHardDiskProperties struct with appropriate JSON tag
- Update virtual hard disk conversion functions to handle the new PlatformDiskId field
- Update test assertions to use t.Error instead of t.Errorf for consistency
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| services/storage/storage.go | Adds PlatformDiskId field definition to VirtualHardDiskProperties struct |
| services/storage/virtualharddisk/virtualharddisk.go | Updates conversion functions to handle PlatformDiskId field mapping |
| services/security/roleassignment/roleassignment_test.go | Replaces t.Errorf with t.Error for test error reporting |
| services/security/role/role_test.go | Replaces t.Errorf with t.Error for test error reporting |
| services/security/identity/identity_test.go | Replaces t.Errorf with t.Error for test error reporting |
| go.mod | Updates Go version and dependencies to newer versions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines failed to run 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Madhan Raj Mookkandy (madhanrm)
approved these changes
Oct 24, 2025
Jonah Kohn (jonah-kohn)
approved these changes
Oct 24, 2025
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
Replaced by #355 |
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.
wmi PR: microsoft/wmi#179
moc PR: microsoft/moc#400
moc-pkg PR: https://github.com/microsoft/moc-pkg/pull/683
wssdagent PR: https://github.com/microsoft/wssdagent/pull/1430
wssd-sdk-for-go PR: microsoft/wssd-sdk-for-go#335
wssdcloudagent PR: https://github.com/microsoft/wssdcloudagent/pull/1603
Add PlatformDiskId to VirtualHardDiskProperties, which will be used by HciVmVirtualHardDisk and stored in the ARM resource later as UniqueID.
This will help customers use the UniqueID to map the ARM resource to an attached disk. Customers can use the Get-Disk or Get-PhysicalDisk PowerShell cmdlets to retrieve the unique ID of the attached disk inside a Windows guest VM and use it to identify the corresponding ARM resource. For Linux VMs, customers can use lsblk to retrieve the serial number of the attached disk and use it to identify the matching ARM resource by comparing it with the unique ID value in the ARM resource.
For example, a partner building a VM migration solution without a dependency on Active Directory will need to consume this.