Windows VM D: drive

Hello,
I have some windows VM on a linux host. I need to know that Is it possible to mount a zfs volume of the host inside a windows VM as D:\ drive? if possible also how?

Thank you !

Yeah, that should work fine, you can add additional disk devices which are block devices.

You’d probably do something like lxc config add device NAME d disk source=/dev/zvol/POOL/VOLUME

Hi, I created a block type storage volume by lxc storage volume create default windows2019 size=10GB --type=block and attached the block volume to the windows VM by lxc storage volume attach default windows2019 windows2019 /data .I can able to see the device inside the VM and able to initialize the disk as D drive.
But in the host, seems that the volume is not mounted. Is that normal incase of Virtual machines?

root@cpu-5244:~# zfs list | grep windows2019
default/custom/default_windows2019                                                             1.19M   710G  1.19M  -
default/virtual-machines/windows2019                                                           10.4M  85.0M  10.4M  /var/lib/lxd/storage-pools/default/virtual-machines/windows2019
default/virtual-machines/windows2019.block                                                     18.4G   710G  18.4G  -

also is possible to write to it from host?

Yes this is normal. Because these are block volumes (rather than filesystem volumes), the LXD host cannot ‘know’ what is inside of them, there is no guarantee it even has a filesystem or whether it is a single partition or multiple. The VM guest can do what ever it likes to the custom volume, so we have to assume it is not mountable.