2010/5/19 Arun Khan
OS: OS 11.2 (64 bit) with stock kernel and 6GB RAM. br0 is defined and bound to eth0, tap0, tap1. br0 is 192.168.1.69.
I have a script to start a KVM with two network interfaces. The content of which is:
<kvm script> qemu-kvm -vga cirrus -m 512 -boot d -cdrom /mnt/transcend-1TB/ISO/debian/debian-testing-amd64-DVD-1.iso -hda $KVM_DIR/vdisks/debian.vdd -hdd $KVM_DIR/vdisks/ba11_swap.vdd -net nic,model=rtl8139,macaddr=${nic_mac_addr0} -net tap,ifname=tap0,script=no,downscript=no -net nic,model=rtl8139,macaddr=${nic_mac_addr1} -net tap,ifname=tap1,script=no,downscript=no
Where ${nic_mac_addr?} is generated by another script to give unique MAC address to each interface.
This VM will act as a gateway to a set of other VMs that are on the same VLAN. The idea is that NIC associated with tap0 will be on the 192.168.1.x network (and do NAT/Proxy) and NIC associated with tap1 will be 172.16.0.1/16 and be the gateway to other VMs.
The above script does not work. I am trying to install Debian Testing as a guest OS directly from the ISO file. KVM initializes and boots from the ISO file and shows the Debian installer screen. As soon as I select an install option things break loose. The KVM SDL window gets locked. The LEDs on all my ethernet switches start flashing. I am not able to connect to other hosts on the LAN and the same is true vice versa.
To see what is going on the LAN, I opened a terminal and started up tcpdump. Doing CTRL-C has no effect. Traffic starts flowing only after I "pkill -9 qemu-kvm" After the qemu-kvm process is killed then I get some output on the tcpdump window (see below)
Any suggestion/pointers on how to setup a KVM with multiple NICs would be appreciated.
<tcpdump> # tcpdump -i eth0 tcpdump: WARNING: eth0: no IPv4 address assigned tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes ^C
^C^C^C^C ^C^C^C^C^C^C^C^C^C17:46:35.002711 IP 192.168.1.35.mdns > 224.0.0.251.mdns: 0*- [0q] 2/0/0[|domain]
1 packets captured 2368261 packets received by filter 2355108 packets dropped by kernel </tcpdump>
Hello Arun, as a solution, you can use "aqemu" kvm-GUI for generating qemu script. http://sourceforge.net/projects/aqemu/. Create the VM, add to this your NICs and click "Create Shell Script" menu -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org