From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZwb0-0004Uu-P7 for qemu-devel@nongnu.org; Wed, 08 May 2013 01:07:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZwaz-0003Fs-Pi for qemu-devel@nongnu.org; Wed, 08 May 2013 01:07:18 -0400 Received: from e28smtp01.in.ibm.com ([122.248.162.1]:58820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZwaz-0003FY-56 for qemu-devel@nongnu.org; Wed, 08 May 2013 01:07:17 -0400 Received: from /spool/local by e28smtp01.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 8 May 2013 10:31:50 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 93DE61258051 for ; Wed, 8 May 2013 10:38:57 +0530 (IST) Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r48574Nd7995776 for ; Wed, 8 May 2013 10:37:05 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r48579Cm007864 for ; Wed, 8 May 2013 15:07:09 +1000 Message-ID: <5189DBED.8060203@linux.vnet.ibm.com> Date: Wed, 08 May 2013 10:30:29 +0530 From: Deepak C Shetty MIME-Version: 1.0 References: <51839700.7040901@linux.vnet.ibm.com> In-Reply-To: <51839700.7040901@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Few Qs related to using qemu-nbd for exporting snapshot List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: qemu-devel@nongnu.org Hi Anthony & the List, I am looking at using qemu-nbd to export an existing snapshot to a Backup virtual appliance (VA) and had the following Qs in that context... 1) Exporting an image using unix socket (-k option) Vs using --connect=/dev/nbd0, which one is better / preferred ? The idea being once exported, the disk will be hotplugged into Backup VA which will then use it as a src for backup operation. 2) If i use the --connect option, it requires the nbd kernel module to be loaded and i also get a nice --disconnect way of terminating the nbd export. Using -k option qemu-nbd doesn't need the nbd kernel module, but the cmdline blocks and sending SIGTERM is the only way to terminate the nbd export... Is there a better way to terminate qemu-nbd if using the -k option ? If not, i assume SIGTERM would gracefully shut down qemu-nbd ? 3) I was not able to get qemu-nbd running without the -t (persistent) option. Ideally without -t would be suited, since there is only one client/connection per nbd export and the nbd server would nicely shut itself down.. but i get the below error .... server as... $ qemu-nbd -k /tmp/nbds1 ./debian_lenny_i386_standard.qcow2 client as... $ qemu-system-x86_64 -m 1024 -drive file=nbd:unix:/tmp/nbds1 connect(unix:/tmp/nbds1): No such file or directory qemu-system-x86_64: -drive file=nbd:unix:/tmp/nbds1: could not open disk image nbd:unix:/tmp/nbds1: No such file or directory nbds1 is indeed there... srwxrwxr-x. 1 dpkshetty dpkshetty 0 May 3 14:24 /tmp/nbds1 and then the server returns to the shell.. echo $? is 0 thanx, deepak