btrfs
btrfs copied to clipboard
Using within KVM
I`d like to use a BTRFS partition as a shared storage between my host (Ubuntu) and VM (W11). Therefore i did a raw disk passthrough:
<disk type="block" device="disk">
<driver name="qemu" type="raw" cache="none" io="native" discard="unmap"/>
<source dev="/dev/disk/by-partuuid/2a571eb7-7c27-4ab1-a012-1257c9009b1d" index="2"/>
<backingStore/>
<target dev="vdc" bus="virtio"/>
<alias name="virtio-disk2"/>
<address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
</disk>
And installed WinBTRFS using choco. I added the upgradbale regkey and the regekey for the mappings. Also set the autodicover flag.
I do see the disk in the manager:
And i have the BTRFS controller:
But i cant mount the device. What am i missing?
If you use the same setup to boot Linux instead, does it work? I don't know much about libvirt, which I assume that XML is from, so I can't tell you if there's a problem with your config file.
I do passthrough a second disk the same way, but it is a NTFS partition. This is recognized and working by the VM.
Should the BTRFS driver appear here?
Hi, you cannot pass through a partition like that using KVM, doing it like that will make the VM treat the partition as a disk instead of as a partition, you would have to pass through the entire disk or format the partition to make a nested disk, if you want to pass through a single partition then the best option is Filesystem Pass through, which is a bit more complicated, you can find a tutorial here https://www.debugpoint.com/kvm-share-folder-windows-guest/#A_note_about_virtiofs or just pass through the entire disk