Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

VMDvdDrive: Get-VMIdeController fails on Gen 2 VM #125

Open
iainbrighton opened this issue Aug 16, 2017 · 0 comments
Open

VMDvdDrive: Get-VMIdeController fails on Gen 2 VM #125

iainbrighton opened this issue Aug 16, 2017 · 0 comments
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.

Comments

@iainbrighton
Copy link
Contributor

When attempting to attach an ISO to Generation 2 VM, it fails when calling Get-VMIdeController with the following error:

Get-VMIdeController : Generation 2 virtual machines do not support IDE.
At C:\Users\Iain\Dropbox\PowerShell\Modules\Lability\DSCResources\xHyper-V\DSCResources\MSFT_xVMDvdDrive\MSFT_xVMDvdDrive.psm1:396 char:20
+ ...  -and -not (Get-VMIdeController -VMName $VMName -ControllerNumber $Co ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-VMIdeController], VirtualizationException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.GetVMIdeController

Adding -ErrorAction SilentlyContinue to the Get-VMIdeController call in the Test-ParameterValid method does appear to resolve the problem.

@iainbrighton iainbrighton changed the title xVMDvdDrive: Get-VMIdeController fails on Generation 2 VM xVMDvdDrive: Get-VMIdeController fails on Gen 2 VM Aug 16, 2017
@bgelens bgelens changed the title xVMDvdDrive: Get-VMIdeController fails on Gen 2 VM xVMDvdDrive - Get-VMIdeController fails on Gen 2 VM Aug 20, 2017
@bgelens bgelens added the bug The issue is a bug. label Aug 20, 2017
@johlju johlju added the help wanted The issue is up for grabs for anyone in the community. label May 16, 2018
@johlju johlju changed the title xVMDvdDrive - Get-VMIdeController fails on Gen 2 VM VMDvdDrive: Get-VMIdeController fails on Gen 2 VM Jun 12, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

3 participants