-
Notifications
You must be signed in to change notification settings - Fork 65
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
Vhd: Failed to create vhdx with error "One or more arguments are invalid" #153
Comments
The problem seems to be the It just adds There are no parameter named |
This was not caught in the tests because the cmdlet is overriden with no parameters. Instead there should be made a stub module file of the Hyper-V cmdlets. See example of creating a stub module file here Write-ModuleStubFile.ps1 |
@kellymenzel Thank you for reporting this issue! Labeled is help wanted so that anyone in the community can run with this. |
I delved into this and found that there really isn't a bug, but there is a very strange, possibly intentional behavior in the New-VHD cmdlet...
...I get the 'One or more arguments are invalid' error. However, if I type
The VHD file is created just fine. Note, the size is 5 * 1024 * 1024. Splatting the switch is working just fine. Note, in the Params hash table, it's $Type, not Type which would evaluate to -Dynamic:$True |
Ah I miss read the hash table. Thank you for sharing this. Let’s open this again and we could update the documentation for that parameter. |
Details of the scenario you tried and the problem that is occurring:
I'm trying to use xVHD to create a virtual hard drive on a Hyper-V server running in Windows Server 1709. I dot sourced the Sample_xVHD_NewVHD.ps1 example from this repository and compiled and ran it. But even with the simplest configuration, I receive an error.
The DSC configuration that is using the resource (as detailed as possible):
Result:
Version of the Operating System and PowerShell the DSC Target Node is running:
Windows Server 1709
Version of the DSC module you're using, or 'dev' if you're using current dev branch:
xHyper-V 3.12.0.0
The text was updated successfully, but these errors were encountered: