On 2011-04-14,at 13:53:48, Qingtang Zhou wrote: >发送日期:2011-04-14 13:53:48 >收件人:wuyu8242 >抄送:Lucas Meneghel Rodrigues; Amos Kong; autotest >主题:Re: [Autotest] About the mac addr and ip addr >> >* On 2011-04-13 15:10:44 +0800, wuyu8242 (wuyu8...@163.com) wrote: >> hi Lucas, Amos, >> >> Disturbing you!There are some issues about network test. About the mac addr >> and ip addr, the result of ifconfig include eth0 and eth1, the eth0 has no ip >> address, the eth1 has a ip: 10.0.2.25, but the conf file of eth1 is not in >> the >> folder of network-scripts. When i login to OS via vncvier and modify the >> eth0 >> conf file to which adding a static ip address, but after reboot system by >> autotest, the static ip did not work. So, I want to know how the mac and ip >> work? It seems that the mac and ip is random generated in code. >yep, autotest won't work correctly if guest has a static ip address. >I am trying to make it work, do you have any idea to share, :p If I have idea, I am very very glad to share it timely :) hehe:) >mac address is generated by autotest, guest ip address should be configed >via dhcp. yes, but my guest setup by autotest don't get the ip from the dhcp, but the guest setup by manual(via virt-manger tool start the same guest img) can get the ip from dhcp server, so why? >> >> the result of ifconfig as following: >> eth0 Link encap:Ethernet HWaddr 9a:a3:23:b0:89:97 >> inet6 addr: fe80::862b:2bff:fefb:6221/64 Scope:Link >[...] >> >> eth1 Link encap:Ethernet HWaddr 9a:a3:23:b0:a9:09 >> inet addr:10.0.2.15 Bcast:10.0.2.155 Mask:255.255.255.0 >[...] >> virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 >> inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 >I find you have a virbr0, are you using a private bridge for test? yes, the result of ifconfig include the virbr0, because my host net via the brigde mode, I don't know the guest setup by autotest via which net mode, my command as following: [33m 92 04/15 05:48:34 INFO | kvm_vm:0987| Running qemu command: /usr/bin/qemu-kvm -name 'vm1' -monitor unix:'/tmp/monitor-humanmonitor1-20110411-062101-hWQJ',server,nowait -serial unix:'/tmp/serial-20110411-062101-hWQJ',server,nowait -drive file='/tmp/kvm_autotest_root/images/f11-64.qcow2',index=0,if=ide,cache=none -net nic,vlan=0,model=rtl8139,macaddr='9a:a3:23:b0:e0:d0',id='idsLxMpu' -net user,vlan=0 -m 512 -smp 2 -redir tcp:5000::22 -vnc :0
>> >> As can be seen from the result of ifconfig, the eth1 is working. If I setup >> dhcp server in host, the issue can be resolved? >you got it. > >> >> BTW, after update the code by "git pull“, the desktop of the virtual machine >> setup by autotest can not be started via vnc, and only start text system. >> >> Thanks! >> wuyu >. > ------------------ wuyu8242 2011-04-15 _______________________________________________ Autotest mailing list Autotest@test.kernel.org http://test.kernel.org/cgi-bin/mailman/listinfo/autotest