qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and devi


From: Richard W.M. Jones
Subject: Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device
Date: Fri, 27 Jul 2018 16:07:44 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Jul 27, 2018 at 05:48:32PM +0300, Nir Soffer wrote:
> On Fri, Jul 27, 2018 at 5:41 PM Richard W.M. Jones <address@hidden>
> wrote:
> 
> > On Fri, Jul 27, 2018 at 05:29:56PM +0300, Nir Soffer wrote:
> > > Do we support specifying an offset in qemu?
> >
> > Yes.  virt-v2v uses this functionality to access files inside
> > tarballs (written by Tomas):
> >
> >
> > https://github.com/libguestfs/libguestfs/blob/67c36779c3bd383f8c550d9c43b0884d1a108c4d/v2v/input_ova.ml#L164
> 
> 
> Does it work also for running vms?

I've not actually tried, but it's built into the qemu raw-format block
driver (see qemu.git/block/raw-format.c) so it should work.  Note AIUI
it'll only work for raw format drives, not qcow2 which is probably a
critical drawback for oVirt.

> Example use case:
> 
> 1. Attach LUN or activate LV
> 2. wipe start of the block device, or write some header
> 3. Start guest with the block device with an offset, so guest see the disk
> starting at offset.
> 
> What about patthrough? can we attach a host device to a guest using an
> offset?

Passthrough likely not.  If qemu isn't processing each block of data
then the qemu block driver wouldn't be able to change offsets.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top



reply via email to

[Prev in Thread] Current Thread [Next in Thread]