]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Enable kernel DHCP autoconf by default
authorPekka Enberg <penberg@kernel.org>
Tue, 9 Aug 2011 17:46:08 +0000 (20:46 +0300)
committerPekka Enberg <penberg@kernel.org>
Tue, 9 Aug 2011 17:46:08 +0000 (20:46 +0300)
As we boot to '/bin/sh' by default, enable kernel DHCP autoconfiguration too.
The guest kernel needs to be configured with the following configuration
options:

  CONFIG_IP_PNP=y
  CONFIG_IP_PNP_DHCP=y

Cc: Asias He <asias.hejun@gmail.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Prasad Joshi <prasadjoshi124@gmail.com>
Cc: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/README
tools/kvm/builtin-run.c

index 5b85461bd96c5ab7701ffe99b89f980ddbe003e1..2cf93645b2c53b60dbaf7c7dfecd5902404f365d 100644 (file)
@@ -70,6 +70,9 @@ 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:
 
index fa5de27ad2acd10cdd072718792023908c5a305e..af7f59c6fbe2a3243d5493b4e38eff6920ff1047 100644 (file)
@@ -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 ", sizeof(real_cmdline));
+                       strlcat(real_cmdline, " init=/bin/sh ip=dhcp ", sizeof(real_cmdline));
        }
 
        if (!strstr(real_cmdline, "root="))