What you're trying to do is called a P2V (Physical to Virtual). You want to directly copy the partition as going through a file share via Linux will definitely strip some metadata Windows wants on those files.
First, make a disk image that's big enough to hold the whole partition and 1-2 GB extra for the ESP:
qemu-img create -f qcow2 YourDiskImageName.qcow2 300G
Then you can make the image behave like a real disk using qemu-nbd:
sudo modprobe nbd
sudo qemu-nbd -c /dev/nbd0 YourDiskImageName.qcow2
At this point, the disk image behaves like any other disk at /dev/nbd0
.
From there create a partition table, you can use cgdisk
or parted
or even the GUI GParted will work on it.
And finally, copy the partition over with dd
:
sudo dd if=/dev/sdb3 of=/dev/nbd0p2 bs=4M status=progress
You can also copy the ESP/boot partition as well so the bootloader works.
Finally once you're done with the disk image, unload it:
sudo qemu-nbd -d /dev/nbd0