Web lists-archives.com

Access a sub partition from KVM host

Hello Debian experts,

I have a kvm/libvirt installed on Debian, with a Windows 10 virtual machine. The Windows virtual machine has access the a whole disk partition, /dev/sda2, that I have added using the virtual machine manager. Because Windows "see" this partition as a disk, it has created partitions inside.

When I use kpartx, I see the partitions:

root@main:/etc# kpartx /dev/sda2
sda2p1 : 0 262144 /dev/sda2 34
sda2p2 : 0 4469876736 /dev/sda2 264192

However, kpartx does not create the device files in /dev

I need to mount this partition from Linux, as *read only*, to share the files easily between Linux and Windows.

Can I mount these partitions from Linux easily, or should I use loop device?

Thanks for your help