[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] A Patch to enable qemu-nbd run as an inetd service
From: |
Jun Sheng |
Subject: |
[Qemu-devel] A Patch to enable qemu-nbd run as an inetd service |
Date: |
Wed, 22 Oct 2014 14:41:54 +0800 |
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
}
qemu-nbd-inet.patch
Description: Text Data
- [Qemu-devel] A Patch to enable qemu-nbd run as an inetd service,
Jun Sheng <=