I have been hopelessly trying to change the sector size of a freshly created Windows 10 VHDX file, to 4096 bytes per sector.
After searching the net and trying things, this comes closest (using Windows 10):
- Install Hyper-V
- Select Start button and type Powershell
- Right mouse click "Run as Administrator"
- Type command:
Set-Vhd -Path 4Kn.vhdx –PhysicalSectorSizeBytes 4096
The latter command has been tried in all possible flavors, with full path, just the filename (after CD'ing to the folder) etc.
I always get errors:
Set-Vhd : The operation on computer 'DESKTOP-JCMNHRV' failed: Invalid class At line:1 char:1 + Set-Vhd -Path C:\Users\Peter\Desktop\4Kn.vhdx –PhysicalSectorSizeByte ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Set-VHD], VirtualizationException + FullyQualifiedErrorId : Unspecified,Microsoft.Vhd.PowerShell.Cmdlets.SetVhd
Any idea what to do or where to start? I don't see it anymore
The .vhdx is not attached, and I tried without any formatting inside, and later with an NTFS formatted volume.