From: Pekka Enberg <penberg@kernel.org>
To: kvm@vger.kernel.org
Cc: Pekka Enberg <penberg@kernel.org>,
Asias He <asias.hejun@gmail.com>, Avi Kivity <avi@redhat.com>,
Cyrill Gorcunov <gorcunov@gmail.com>, Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Prasad Joshi <prasadjoshi124@gmail.com>,
Sasha Levin <levinsasha928@gmail.com>
Subject: [PATCH] kvm tools: Enable kernel DHCP autoconf by default
Date: Tue, 9 Aug 2011 20:53:31 +0300 [thread overview]
Message-ID: <1312912411-9416-1-git-send-email-penberg@kernel.org> (raw)
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 | 3 +++
tools/kvm/builtin-run.c | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tools/kvm/README b/tools/kvm/README
index 5b85461..2cf9364 100644
--- a/tools/kvm/README
+++ b/tools/kvm/README
@@ -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:
diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
index fa5de27..af7f59c 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 ", sizeof(real_cmdline));
+ strlcat(real_cmdline, " init=/bin/sh ip=dhcp ", sizeof(real_cmdline));
}
if (!strstr(real_cmdline, "root="))
--
1.7.0.4
next reply other threads:[~2011-08-09 17:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-09 17:53 Pekka Enberg [this message]
2011-08-10 0:03 ` [PATCH] kvm tools: Enable kernel DHCP autoconf by default Asias He
2011-08-10 5:00 ` Pekka Enberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1312912411-9416-1-git-send-email-penberg@kernel.org \
--to=penberg@kernel.org \
--cc=asias.hejun@gmail.com \
--cc=avi@redhat.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=mingo@elte.hu \
--cc=prasadjoshi124@gmail.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox