Skip to content
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

Hyper-v cmdlets can't use wsl paths #2286

Closed
fabioDMFerreira opened this issue Jan 26, 2021 · 1 comment
Closed

Hyper-v cmdlets can't use wsl paths #2286

fabioDMFerreira opened this issue Jan 26, 2021 · 1 comment
Assignees

Comments

@fabioDMFerreira
Copy link

fabioDMFerreira commented Jan 26, 2021

This issue is a problem I'm having using Add-VMHardDiskDrive. Documentation is fine!

I am not able to use a WSL path as argument.

Add-VMHardDiskDrive -VMName test  -Path \\wsl$/Ubuntu/home/<image path>

This command launches the next error

Add-VMHardDiskDrive : 'test' failed to add resources to 
'test'.
An unexpected error occurred: The network name cannot be found. (0x80070043).
'test' failed to add resources. (Virtual machine ID 
4F4777B2-4DFD-4A07-89B6-44FFC5BE2D3F)
'main-image-1611598805' encountered an unexpected error: The network name cannot be 
found. (0x80070043). (Virtual machine ID 4F4777B2-4DFD-4A07-89B6-44FFC5BE2D3F)
At line:1 char:1
+ Add-VMHardDiskDrive -VMName test  -Path \\wsl$/Ubunt ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-VMHardDiskDrive], Virtualizatio 
   nException
    + FullyQualifiedErrorId : OperationFailed,Microsoft.HyperV.PowerShell.Commands.A 
   ddVMHardDiskDrive

It seems the cmdlet can't access paths located in other network devices.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@o0nj
Copy link
Contributor

o0nj commented Feb 12, 2021

It seems that this question can best be answered via PowerShell Community Links

The issues section of this repository is for content fixes regarding documentation.

Thank you.

@o0nj o0nj closed this as completed Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants