Bug 531631

Summary: Windows XP unattended install doesn't get an IP address after rebooting, if using -net user
Product: Red Hat Enterprise Linux 5 Reporter: Lucas Meneghel Rodrigues <lmr>
Component: kvmAssignee: Eduardo Habkost <ehabkost>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: areis, ehabkost, ndai, tburke, virt-maint, ykaul
Target Milestone: rcKeywords: Reopened, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kvm-83-136.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 07:55:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 546562    

Description Lucas Meneghel Rodrigues 2009-10-28 22:28:59 UTC
Description of problem: If we call qemu with user mode networking + a custom MAC address, the built in DHCP server won't service the guest. In upstream qemu-kvm and qemu, it will.

Version-Release number of selected component (if applicable): Relevant versions:

etherboot-zroms-kvm-5.4.4-10.el5ovirt
kmod-kvm-83-101.el5
kvm-debuginfo-83-69.el5ovirt
kvm-qemu-img-83-101.el5
kvm-83-105.el5_4.2
etherboot-roms-kvm-5.4.4-10.el5ovirt
kvm-tools-83-101.el5


How reproducible: Allways


Steps to Reproduce:
1. Install a guest using qemu-kvm

/kvm/attend_install/autotest/client/tests/kvm/qemu -name 'vm1' -monitor unix:/tmp/monitor-20091026-051417-Zx8G,server,nowait -drive file=/kvm/attend_install/autotest/client/tests/kvm/images/fc11-32.qcow2,if=ide -net nic,vlan=0,macaddr=52:54:00:12:34:56 -net user,vlan=0 -m 1024 -cdrom /kvm/attend_install/autotest/client/tests/kvm/isos/linux/Fedora-11-i386-DVD.iso -fda /kvm/attend_install/autotest/client/tests/kvm/images/floppy.img -tftp /kvm/attend_install/autotest/client/tests/kvm/images/tftpboot  -boot d -bootp /pxelinux.0 -boot n -redir tcp:5000::22 -vnc :0

Notice the custom MAC address passed along with user mode networking.

2. After the guest installed, try to acquire an IP using the dchp server (ipconfig /renew on windows or dhclient on linux guests)
  
Actual results: DHCP request times out and guest can't get an IP address

Expected results: DHCP request succeeds and guest gets an IP address

Additional info: Like mentioned previously, upstream qemu-kvm does not show this behavior, guests are serviced regardless of the MAC chosen.

Also, this feature is critical for automated testing, as the automated unattended install method relies on the guest being able to have network configured through DHCP.

Comment 1 Eduardo Habkost 2009-10-29 00:07:38 UTC
I couldn't reproduce it. But I didn't use exactly the same command-line: as the guest was already installed and I didn't have floppy, cdrom, and tftpboot images, I didn't use those options. I used the following command-line:

/usr/libexec/qemu-kvm -name 'vm1' -monitor unix:/tmp/monitor-20091026-051417-Zx8G,server,nowait -drive file=/mnt/common/images/rhel54-32f.img,if=ide -net nic,vlan=0,macaddr=52:54:00:12:34:56 -net user,vlan=0 -m 1024 -boot c -redir tcp:5000::22 -vnc 0.0.0.0:0

And the guest got an IP address (10.0.2.15) normally.

I have kvm-83-118.el5.x86_64 and kmod-kvm-83-118.el5.x86_64 installed.

Comment 2 Eduardo Habkost 2009-11-17 16:34:21 UTC
After some debugging, I found out that the problem doesn't requrie a custom MAC address. The problem is present when using '-net user', but it was only detected because the unattended install autotest code needs networking to signal that install finished.

Comment 6 Lucas Meneghel Rodrigues 2009-12-07 11:15:29 UTC
I can confirm that this problem is fixed. Thanks Eduardo for your efforts. You guys can go ahead and close this bug.

Comment 7 Eduardo Habkost 2009-12-07 18:14:31 UTC
bug shouldn't be closed manually, but it should be handled by QE / Errata Tool instead.

Comment 13 errata-xmlrpc 2010-03-30 07:55:50 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0271.html