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

Can't use VHD[X] files on ZFS #381

Open
florean opened this issue May 23, 2024 · 7 comments
Open

Can't use VHD[X] files on ZFS #381

florean opened this issue May 23, 2024 · 7 comments

Comments

@florean
Copy link

florean commented May 23, 2024

System information

Type Version/Name
Distribution Name Microsoft Windows
Distribution Version 23H2
Kernel Version 22631.3593
Architecture AMD64
OpenZFS Version zfswin-2.2.3rc4

Describe the problem you're observing

Power Shell commands can't access VHD files on ZFS volumes. I appear to be able to create them successfully, but accessing them afterwards with a command like Get-VHD results in an immediate failure.

Describe how to reproduce the problem

In a Power Shell window in a directory on a ZFS volume:

  1. New-VHD -Path .\test.vhd -SizeBytes 16GB
  2. Get-VHD -Path .\test.vhd

Passing the full file path makes no difference. Creating a VHDX file has the same problem. Sorry, I don't use Windows much so I don't know how to get much more than that, but I'm happy to follow any instructions to provide more detailed info.

Include any warning/errors/backtraces from the system logs

Get-VHD : '.\test.vhd' is not an existing virtual hard disk file.
At line:1 char:1
+ Get-VHD -Path .\test.vhd
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-VHD], VirtualizationException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.Vhd.PowerShell.Cmdlets.GetVHD
@lundman
Copy link

lundman commented May 23, 2024

PS C:\WINDOWS\system32> New-VHD -Path .\test.vhd -SizeBytes 16GB
New-VHD : The term 'New-VHD' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ New-VHD -Path .\test.vhd -SizeBytes 16GB

addon needed?

@lundman
Copy link

lundman commented May 23, 2024

Ah
Hyper-V | Hyper-V Management tools | Hyper-V Module for Windows PowerShell

@lundman
Copy link

lundman commented May 23, 2024

Screenshot 2024-05-23 at 12 41 09

OK, gimme a few to implement

@andrewc12
Copy link

@andrewc12 note to self for regression tests

@lundman
Copy link

lundman commented May 23, 2024

95e8bec

@florean
Copy link
Author

florean commented May 23, 2024

Wow, amazing response. I wanted to note that I was able to use a VHDX file by setting it up on a NTFS drive and then migrating the VM to a ZFS drive, but it looks like you've already solved it.

Is that File Spy you're using for the events or something else? I've had problems running Steam games from ZFS and I'd like to be able to do some troubleshooting around that.

Thanks again for your quick response!

@lundman
Copy link

lundman commented May 23, 2024

Yeah, filespy.exe is good at seeing what requests and responses it sends, usually to a drive (say, if ZFS is E:). You can do the same against a drive that is NTFS and look for anything different in the responses. I think its home is here http://www.zezula.net/en/tools/main.html

filetest.exe is a similar tool where you can set parameters and send a request to see reply. More useful once you know what is wrong from filespy.exe.

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

3 participants