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

Re: qemu-nbd



On 2018-03-22 13:17, Pascal wrote:
> hi everybody,
> 
> when I use `qemu-nbd -s -c /dev/nbd0 /dev/sda` where are changes to
> /dev/ndb0 saved ?
> I searched in /proc/{pid_of_qemu-nbd}/ but found nothing there...

In snapshot mode, qemu (or in this case qemu-nbd) creates a temporary
qcow2 file in $TMPDIR (or /var/tmp) which will get the changes.  You
should see a link to that file in /proc/$pid/fd, like this:

lrwx------. [...] 10 -> /var/tmp/vl.JjYLDm (deleted)

As you can see, the file is deleted right after it is opened, though.

If you want to have control over where the data is stored, you can just
create the overlay yourself, like so:

$ qemu-img create -f qcow2 -b /dev/sda -F raw overlay.qcow2
$ qemu-nbd -c /dev/nbd0 overlay.qcow2

Max

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: