From e2dd07da358ddcab95016d2d4d26ece73eae3e3f Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Wed, 10 Aug 2011 07:59:11 +0300 Subject: [PATCH] Revert "kvm tools: Enable kernel DHCP autoconf by default" This reverts commit f0aec23a91368e916a53e6072f2173bb481b1544. Asias He writes: 'ip=dhcp' makes kernel try to use nfs as root fs which results in a long time 'wait and fail' and finally fallback to 9p as root fs. [ 1.688000] Sending DHCP requests ., OK [ 1.695000] IP-Config: Got DHCP answer from 192.168.33.1, my address is 192.168.33.15 [ 1.699000] IP-Config: Complete: [ 1.700000] device=eth0, addr=192.168.33.15, mask=255.255.255.0, gw=192.168.33.1, [ 1.703000] host=192.168.33.15, domain=stu.buaa.edu.cn, nis-domain=(none), [ 1.706000] bootserver=192.168.33.1, rootserver=192.168.33.1, rootpath= [ 36.769000] VFS: Unable to mount root fs via NFS, trying floppy. [ 36.771000] VFS: Mounted root (9p filesystem) on device 0:14. --- tools/kvm/README | 3 --- tools/kvm/builtin-run.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/kvm/README b/tools/kvm/README index 2cf93645b2c5..5b85461bd96c 100644 --- a/tools/kvm/README +++ b/tools/kvm/README @@ -70,9 +70,6 @@ linux-0.2.img.bz2 - For virtio-rng device (--rng): CONFIG_HW_RANDOM_VIRTIO=y - - For kernel DHCP autoconf (when booting to /bin/sh): - CONFIG_IP_PNP=y - CONFIG_IP_PNP_DHCP=y 5. And finally, launch the hypervisor: diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index af7f59c6fbe2..fa5de27ad2ac 100644 --- a/tools/kvm/builtin-run.c +++ b/tools/kvm/builtin-run.c @@ -601,7 +601,7 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix) using_rootfs = 1; if (!strstr(real_cmdline, "init=")) - strlcat(real_cmdline, " init=/bin/sh ip=dhcp ", sizeof(real_cmdline)); + strlcat(real_cmdline, " init=/bin/sh ", sizeof(real_cmdline)); } if (!strstr(real_cmdline, "root=")) -- 2.39.5