Received: from eggs.gnu.org ([2001:4830:134:3::10]:40014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Z1i-0000tO-Sp for qemu-devel@nongnu.org; Tue, 17 May 2016 03:02:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2Z1d-00068r-Sg for qemu-devel@nongnu.org; Tue, 17 May 2016 03:02:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Z1d-00067Y-O6 for qemu-devel@nongnu.org; Tue, 17 May 2016 03:02:41 -0400 From: Markus Armbruster References: <5b967fa5-262d-ccdf-ac25-84d444e1091c@huawei.com> <20160516162258.GA15256@stefanha-x1.localdomain> Date: Tue, 17 May 2016 09:02:37 +0200 In-Reply-To: <20160516162258.GA15256@stefanha-x1.localdomain> (Stefan Hajnoczi's message of "Mon, 16 May 2016 09:22:58 -0700") Message-ID: <871t51yxo2.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] Hot reload network configuration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Hu Keping , qemu-devel@nongnu.org, "Liuhua (G)" , 'peifeiyue' Stefan Hajnoczi writes: > On Wed, May 11, 2016 at 08:50:54PM +0800, Hu Keping wrote: >> Is there any possible that start qemu with --net=none and then change the >> configuration of the network, say using tap for example? > > Yes. If your machine type supports PCI hotplug then you can use the > netdev_add and device_add commands. This is equivalent to hotplugging a > NIC into a running machine. > > I don't have exact syntax because I haven't tested it, but it should be > similar to using the -netdev tap,id=netdev0 -device e1000,netdev=netdev0 > command-line option syntax. Aside: we should be able to swap out the network backend without unplugging + plugging the frontend, in a way that looks like unplugging + plugging the network cable, possibly changing to a different network. As far as I know, we can't do that today, but it could be a fun project.