-
Notifications
You must be signed in to change notification settings - Fork 35
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
virt-v2v: Replace the Get-Disk and Set-Disk with diskpart #991
Conversation
Issue: The Get-Disk and Set-Disk do not support dynamic disks. https://learn.microsoft.com/en-us/powershell/module/storage/get-disk?view=windowsserver2022-ps Signed-off-by: Martin Necas <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #991 +/- ##
=======================================
Coverage 16.21% 16.21%
=======================================
Files 106 106
Lines 19543 19541 -2
=======================================
+ Hits 3168 3169 +1
+ Misses 16094 16092 -2
+ Partials 281 280 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
I don't speak ps1, lgtm
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.
Mostly requetsing change to avoid that we accidentally merge it.
foreach ($disk in $disks) { | ||
$diskNumber = $disk.Index # Get the disk index which corresponds to the disk number | ||
|
||
# Create a diskpart script to set the disk online | ||
$diskpartScript = @" | ||
select disk $diskNumber | ||
online disk | ||
attributes disk clear readonly | ||
"@ |
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.
This feels quie risky to me.
Take an index from one tool/api, and use it in a different tool/api.
This is just waiting for indexes to be out of sync for whatever reason.
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.
100% agree and I would like to not use the diskpart
Can we close this? |
Issue: The Get-Disk and Set-Disk do not support dynamic disks. https://learn.microsoft.com/en-us/powershell/module/storage/get-disk?view=windowsserver2022-ps