From: Jun Sheng <chaoseternal@gmail.com>
To: qemu-devel@nongnu.org
Cc: Jun Sheng <chaoseternal@gmail.com>
Subject: [Qemu-devel] [PATCH] A Patch to enable qemu-nbd run as an inetd service
Date: Wed, 29 Oct 2014 11:36:24 +0800 [thread overview]
Message-ID: <1414553785-23571-1-git-send-email-chaoseternal@gmail.com> (raw)
In-Reply-To: <5448180A.8060403@redhat.com>
run qemu-nbd as an inetd service has some benefits
* more scriptable, such as serve multiple images to different clients
on one ip/port
* access control using tcpd
simple usage:
#!/bin/sh
# qemu-nbd wrapper, select image file according to client ip address
IMG_FILE=`sed -n "s/$REMOTE_HOST //p" /path/to/image_list.txt`
qemu-nbd -i 10 $IMG_FILE 10<&0- 1>/tmp/log 2>/tmp/log2
#end
#xinetd.conf
service nbd
{
flags = REUSE
socket_type = stream
wait = no
user = some_user
server = /path/to/qemu-nbd-wrapper.sh
log_on_failure += USERID
disable = no
}
Signed-off-by: Jun Sheng <chaoseternal@gmail.com>
next prev parent reply other threads:[~2014-10-29 3:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 18:54 [Qemu-devel] A Patch to enable qemu-nbd run as an inetd service Jun Sheng
2014-10-22 20:48 ` Eric Blake
2014-10-27 12:54 ` Jun Sheng
2014-10-29 3:36 ` Jun Sheng [this message]
2014-10-29 3:36 ` [Qemu-devel] [PATCH] inetd enabled qemu-nbd Jun Sheng
2014-10-29 15:16 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1414553785-23571-1-git-send-email-chaoseternal@gmail.com \
--to=chaoseternal@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).