From mboxrd@z Thu Jan 1 00:00:00 1970 From: Asias He Subject: Re: [PATCH 2/2] kvm tools: handle failure of command Date: Wed, 10 Aug 2011 17:28:11 +0800 Message-ID: <4E424F2B.80204@gmail.com> References: <1312944249-4946-1-git-send-email-walimisdev@gmail.com> <1312944249-4946-2-git-send-email-walimisdev@gmail.com> <20110810050340.GB16258@walimis-desktop> <4E42176B.7000701@kernel.org> <20110810053304.GC16258@walimis-desktop> <20110810061252.GD16258@walimis-desktop> <20110810063225.GE16258@walimis-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: walimis , Cyrill Gorcunov , Ingo Molnar , Sasha Levin , Prasad Joshi , kvm@vger.kernel.org To: Pekka Enberg Return-path: Received: from mail-pz0-f42.google.com ([209.85.210.42]:40740 "EHLO mail-pz0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752632Ab1HJJ2Y (ORCPT ); Wed, 10 Aug 2011 05:28:24 -0400 Received: by pzk37 with SMTP id 37so1544586pzk.1 for ; Wed, 10 Aug 2011 02:28:24 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 08/10/2011 02:49 PM, Pekka Enberg wrote: > On Wed, Aug 10, 2011 at 9:32 AM, walimis wrote: >> I used to use tap to enable network for guest os, so that I can mount >> nfs rootfs. meanwhile, I can access the guest os from host os through the >> network. For kvm tools, I don't know how to do that through userspace >> networking. Maybe we need a brief explanation in README. > > Right. I've never used that. Asias is that supported? > I have not tried nfs with our user mode network. But I think walimis can do it with sudo ./kvm --network tap We need sudo because we need CAP_NET_ADMIN to open /dev/net/tun. By default, the ip address in host side is: 192.168.33.1/24 In guest side, you need to config a ip address for our guest: $ sudo ifconfig eth0 192.168.33.15 $ sudo route add default gw 192.168.33.1 $ ping 192.168.33.1 That's it. If you want to access the real world in guest, try NAT or Bridge the tap device. -- Best Regards, Asias He