Windows create pool in vhdx with ps
From OpenZFS on OS X
Revision as of 07:38, 25 May 2022 by 101.177.71.25 (Talk)
Create
$imgpath = "c:\tmp\test.vhdx"
$imgsize = 527433728
New-VHD -Path $imgpath -SizeBytes $imgsize
$disk = Mount-VHD -Path $imgpath -PassThru
get "Physical" disk for mounted vhd
$physdisk = Get-CimInstance -ClassName Win32_DiskDrive -Property * | Where-Object {$_.Index -eq $disk.DiskNumber}
zpool.exe create -O casesensitivity=insensitive -O atime=off -o ashift=12 wintank $physdisk.Name
Destroy
zpool.exe export wintank
Dismount-VHD -Path $imgpath