qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 8/9] qmp: add NBD server commands


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 8/9] qmp: add NBD server commands
Date: Wed, 31 Oct 2012 13:46:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1

Il 31/10/2012 12:23, Christoph Hellwig ha scritto:
> On Mon, Oct 01, 2012 at 04:52:23PM +0200, Paolo Bonzini wrote:
>> Adding an NBD server inside QEMU is trivial, since all the logic is
>> in nbd.c and can be shared easily between qemu-nbd and QEMU itself.
>> The main difference is that qemu-nbd serves a single unnamed export,
>> while QEMU serves named exports.
> 
> I've started playing around with qemu-nbd and have started looking into
> named exports, aio, and adding snapshort support.  I'm wondering if instead
> of adding this I should try to base it on your embedded server.

qemu-nbd does support AIO in the latest versions.  There's also
--cache=MODE and --aio=MODE command-line options.  In fact, a large part
of the code is shared between qemu-nbd and the embedded server. The only
difference is that qemu-nbd uses unnamed exports, while qemu names them.
 qemu-nbd also has options to show only one partition, which you
probably do not need.

But if you need a QMP interface, adding it to qemu-nbd would really be a
bad idea. :)

> That would give me the named exports, aio and monitor/qmp based
> snapshot creation.
> 
> The only thing to add would be a qemu mode where it doesn't run an
> actual guest.

You can use qtest mode to get very close to this (even if you send
stop/cont by mistake on the monitor, no code will actually run):

qemu-system-x86_64 -chardev file,id=null,path=/dev/null -qtest null
-machine accel=qtest -m 1 -nodefaults -nographic

but having a separate do-nothing target would probably be nicer...
though Anthony may have different opinions.

Paolo

> Does anyone have opinions on this?






reply via email to

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