Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #195232

Re: Access a sub partition from KVM host

From Richard Hector <richard@walnut.gen.nz>
Newsgroups linux.debian.user
Subject Re: Access a sub partition from KVM host
Date 2018-05-01 02:30 +0200
Message-ID <vKrl7-3go-1@gated-at.bofh.it> (permalink)
References <vKk0h-6C5-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 01/05/18 04:31, André Rodier wrote:
> 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?

kpartx can do that, with -a ...

But I would seriously not do that, unless the Windows VM isn't running.
Even read only.

Neither OS will know what the other one is doing, and could be keeping
caches or whatever ... you're liable to get corruption.

I would suggest sharing the directories over the network instead. A
little slower, but much safer.

Richard

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Access a sub partition from KVM host André Rodier <andre@rodier.me> - 2018-04-30 18:40 +0200
  Re: Access a sub partition from KVM host Richard Hector <richard@walnut.gen.nz> - 2018-05-01 02:30 +0200
    Re: Access a sub partition from KVM host André Rodier <andre@rodier.me> - 2018-05-01 08:30 +0200

csiph-web