-
Notifications
You must be signed in to change notification settings - Fork 21
Fixes for VM reconnect #185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses three bugs related to VM reconnection and disk hydration in the Hyper-V virtualization layer. The key changes improve path comparison for VHD detection and add support for reading the disk type (dynamic vs. fixed) from WMI disk settings.
- Improved path comparison to handle case-insensitive and cross-platform path matching
- Added ability to detect whether a disk is dynamic or fixed from WMI settings
- Updated tests to verify the new dynamic flag functionality
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pkg/virtualization/core/virtualsystem/virtualmachine.go | Enhanced path comparison in GetVirtualHardDiskByPath to use case-insensitive matching with filepath.Clean and strings.ToLower |
| pkg/virtualization/core/storage/disk/virtualharddisksettingdata.go | Added VirtualHardDiskTypeSetting enum and logic to parse disk Type field from XML to determine if disk is dynamic |
| pkg/virtualization/core/storage/service/ImageManagementService.go | Updated GetVirtualHardDiskConfig signature to return the dynamic boolean flag |
| pkg/virtualization/core/storage/service/ImageManagementService_test.go | Extended test to capture and verify the new dynamic flag return value |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pkg/virtualization/core/storage/disk/virtualharddisksettingdata.go
Outdated
Show resolved
Hide resolved
pkg/virtualization/core/storage/disk/virtualharddisksettingdata.go
Outdated
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
pkg/virtualization/core/storage/disk/virtualharddisksettingdata.go
Outdated
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Fixes for VM reconnect
This PR addresses the following bugs:
Testing