From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KxjVq-0006yf-3k for qemu-devel@nongnu.org; Wed, 05 Nov 2008 09:37:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KxjVo-0006yT-9I for qemu-devel@nongnu.org; Wed, 05 Nov 2008 09:37:36 -0500 Received: from [199.232.76.173] (port=56264 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxjVo-0006yQ-5W for qemu-devel@nongnu.org; Wed, 05 Nov 2008 09:37:36 -0500 Received: from mx1.redhat.com ([66.187.233.31]:45131) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KxjVn-0001NZ-Uh for qemu-devel@nongnu.org; Wed, 05 Nov 2008 09:37:36 -0500 Date: Wed, 5 Nov 2008 14:37:31 +0000 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] Live migration - exec: support to be reintroduced? Message-ID: <20081105143731.GM25523@redhat.com> References: <49113157.3090101@codemonkey.ws> <20081105100546.GA25523@redhat.com> <491199A2.1040207@redhat.com> <4911AA29.1090101@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4911AA29.1090101@codemonkey.ws> Reply-To: "Daniel P. Berrange" , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On Wed, Nov 05, 2008 at 08:14:01AM -0600, Anthony Liguori wrote: > Avi Kivity wrote: > >Daniel P. Berrange wrote: > >>We used it to implement save-to-file, exec'ing 'dd'. I'd rather prefer > >>that we had a more explicit 'migrate to a file' capability rather than > >>the hack of execing dd. > >> > > > >(qemu) acceptfd blah > >receives an file descriptor from the monitor using SCM_RIGHTS and > >assigns it to the tag 'blah' > >(qemu) migrate fd:blah > >migrates to the fd denominated by the tag 'blah' > >(qemu) closefd blah > > This could be generally useful for other things too (like char device > redirection). > > I'm not sure how many people would really use it though, you're talking > about serious unix-fu here. It is useful from a security point of view - it means QEMU doesn't need to be given permissions to create files, merely append to an opened file handle. On a related note, Avi pointed out to me that SCM_RIGHTS fd passing would be important for NIC hotplug to allow parity with -net arg on the command line. If the QEMU process is running unprivileged, it will not have rights to create TAP devices & giving it a setuid() network script is not desirable. The management app invoking QEMU could open the TAP device, and do any setup before passing the FD to the NIC hotplug command in the monitor. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|