From: daniel pecka Subject: Q: NO-CARRIER at NIC in guest Date: Thu, 19 Aug 2010 00:05:06 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from lo.gmane.org ([80.91.229.12]:34422 "EHLO lo.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751103Ab0HSAKG (ORCPT ); Wed, 18 Aug 2010 20:10:06 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Olshn-0004wp-Nj for kvm@vger.kernel.org; Thu, 19 Aug 2010 02:10:03 +0200 Received: from 80.243.104.123 ([80.243.104.123]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Aug 2010 02:10:03 +0200 Received: from dpecka by 80.243.104.123 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Aug 2010 02:10:03 +0200 Sender: kvm-owner@vger.kernel.org List-ID: hi there .. first i'd like to notice, that *i *am *not *subscribed in this mailinglist, hence i have found at mailinglist info page: "No need to subscribe for a one-off question, just send an email." but now let's go on and see what's the problem: i just need to achieve a NO-CARRIER status on NIC in kvm guest. Sounds easy, but i've spend with it several hours and now i'm pretty frustrated. my basic script for launching machine is this: ----------------------------------------------- qemu-kvm -m 1024 -k en-us -vnc :5 -localtime -hda /home/kvm/opensuse/suse113.iso -cdrom /home/kvm/opensuse/openSUSE-11.3-DVD-x86_64.iso -boot d \ -net nic,model=e1000,vlan=1 -net tap,ifname=suse0,script=no,vlan=1 \ -net nic,model=e1000,vlan=2 -net tap,ifname=suse1,script=no,vlan=2 \ -monitor unix:/home/kvm/opensuse/instance,server,nowait & sleep 2; ip l set suse0 up; ip l set suse1 up; ip a a 192.168.88.1/24 dev suse0; ip a a 192.168.99.1/24 dev suse1; echo 1 >/proc/sys/net/ipv4/ip_forward; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; iptables -A FORWARD -s 192.168.88.0/24 -o eth0 -j ACCEPT; ----------------------------------------------- i expected initially, that i could *unplug *virtual *lan *cable by using qemu/monitor feature (accessible in my case via `nc -6U /home/kvm/opensuse/instance`) but i wasn't been able to do that .. i won't list all what i have tested .. the results were been of course, that i disabled several ways networking on particular iface, but wanted and beprayed NO-CARRIER status didn't occur .. i have also tried to change my *netconfig in starting script as: -net nic,model=e1000,vlan=1 \ -net nic,model=e1000,vlan=2 -net tap,ifname=suse1,script=no,vlan=2 \ ^^ and several more variations, but with no success .. i'd like in the best case meet a goal, when i'll be able to *{,un}plug wanted tap.$n device (in qemu/monitor) in runtime .. i'll be also very happy if i could even configure one of my NICs in guest with NO-CARRIER anyhow .. why? i just need to reproduce some buggy behaviour. nothing else then NO-CARRIER status on NIC in guest could make me happy .. thank you very much, boys and girls, for KVM .. it's a excellent piece of software and i'm using it happily several past years. regards by daniel Best Regards / S Pozdravem Daniel Pecka -------------------------------------------------- UNIX Administrator, SunOS Specialist www.techniservit.cz mailto:// callto:<+0420603166533>