-
Notifications
You must be signed in to change notification settings - Fork 11
Description
One of the first commands to implement on Windows is to_disk.
We should have a similar workflow as done on linux. This is my idea of it
-
Phase 0: Check for existing cached disk image
The current code uses extended attributes (xattrs) for handling the cache. On Windows this does not work as rustix cannot be imported. However, NTFS supports a kind of extended attributes (NTFS Alternate Data Stream) so we could try to use a library which is cross-platform (suggestions??), otherwise we should have a mechanism to store data in a sidecar metadata file or leverage the Registry. -
Phase 1: Validation and preparation
This should work similarly to what we have on the main branch. NTFS supports sparse file so we could reuse the current code. The difference is that we need to create a temporary image. We first create a raw image and then convert it to a vhd/vhdx image. -
Phase 3 -5
We create a new podman machine using hyper-v (which shares a volume where the final .vhdx image will be stored) and execute the code/scripts used for linux (maybe instead of using the source image as the installer environment we should use a custom image?), then we leverage qemu-img to convert the resulting .raw to .vhdx. The podman machine is deleted (or should we keep it there for bootc purposes and just stop it?) and the host is able to use the.vhdxfor further operations.