Hi:

additional I try to catch package using tcpdump, but I don't get any
package, need I do more configuration in the kick-start script to make vm
send DHCP request to the dnsmasq?

autotest-boun...@test.kernel.org wrote on 2012-03-13 11:53:45:

> From: Sheng SL Liu/China/Contr/IBM@IBMCN
> To: Autotest@test.kernel.org
> Date: 2012-03-13 11:54
> Subject: [Autotest] Autotest unattended install could not succeed at
> the post install stage
> Sent by: autotest-boun...@test.kernel.org
>
> Hi:
> I run kvm autotest on a power machine. But it doesn't work, I even
> can't successfully run the unattended install test. The install test
> is running but it blocks at the end of installation until timeout.
> I explorer the code and find such in unattended_install.py:
>
> while (time.time() - start_time) < install_timeout:
> ...
> if params.get("wait_no_ack", "no") == "no":
> client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> try:
> client.connect((vm.get_address(), port))
> if client.recv(1024) == "done":
> break
> except (socket.error, virt_vm.VMAddressError):
> pass
> ...
>
> the running flow always go to the except brunch, and if I print
> vm.get_address() it raises a VMIPAddressMissingError exception
> indicating no IP address for the mac is in the address_cache.
>
> I find kvm autotest runs a tcpdump command to get the mac and ip pair:
>
> cmd = "%s -npvi any 'dst port 68'" % virt_utils.find_command("tcpdump")
> logging.debug("Starting tcpdump '%s'", cmd)
> env["tcpdump"] = aexpect.Tail(
> command=cmd,
> output_func=_update_address_cache,
> output_params=(env["address_cache"],))
>
> but if I print address_cache out, I find it never update after
> initialization...
>
> in the Fedora-16ppc64.ks file, I see it raises dhclient command and
> start server here:
>
> %post --interpreter /usr/bin/python
> import socket, os
> os.system('grubby --remove-args="rhgb quiet" --update-kernel=$
> (grubby --default-kernel)')
> os.system('dhclient')
> os.system('chkconfig sshd on')
> os.system('iptables -F')
> os.system('echo 0 > /selinux/enforce')
> server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> server.bind(('', 12323))
> server.listen(1)
> (client, addr) = server.accept()
> client.send("done")
> client.close()
> %end
>
> I try to add os.system('ifconfig > ifconfig_b.log') and os.system
> ('ifconfig > ifconfig_a.log') finding the eth0 has no ip both before
> and after os.system('dhclient') call.
>
> here's the qemu command autotest runs:
>
> qemu-system-ppc64 -name 'vm1' -monitor unix:'/tmp/monitor-
> humanmonitor1-20120309-033917-duRI',server,nowait -drive file='/
> home/liusheng/f16-ppc64.raw',index=0,if=scsi,cache=none -device
> spapr-vlan,netdev=idg0VstV,mac='9a:ea:d6:ab:71:90',id='id2YbDQy' -
> netdev tap,id=idg0VstV,fd=21 -m 2048 -smp 8 -drive file='/home/
> liusheng/kvm_autotest_root/isos/linux/Fedora-16-ppc64-
> DVD.iso',media=cdrom,index=2 -drive file='/home/liusheng/
> kvm_autotest_root/images/f16-64/ks.iso',media=cdrom,index=1 -kernel
> '/tmp/kvm_autotest_root/images/f16-64/vmlinuz' -append
> 'root=live:CDLABEL=Fedora-16-ppc64 ks=cdrom:/ks.cfg console=hvc0
> serial rd_NO_PLYMOUTH' -initrd '/tmp/kvm_autotest_root/images/
> f16-64/initrd.img' -nographic -M pseries -enable-kvm -mem-path /var/
> lib/hugetlbfs/global/pagesize-16MB/
>
> the dnsmasq process info from ps cmd:
>
> nobody 3997 1 0 04:49 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --
> bind-interfaces --pid-file=/usr/local/var/run/libvirt/network/
> default.pid --conf-file= --except-interface lo --listen-address 192.
> 168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-
> leasefile=/usr/local/var/lib/libvirt/dnsmasq/default.leases --dhcp-
> lease-max=253 --dhcp-no-override
>
> Thank you very much!
> Best Regards!_______________________________________________
> Autotest mailing list
> Autotest@test.kernel.org
> http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
_______________________________________________
Autotest mailing list
Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to