On Wed, Aug 24, 2011 at 9:51 PM, Avi Kivity <avi@xxxxxxxxxx> wrote: > On 08/24/2011 08:41 PM, Sasha Levin wrote: >> >> On Wed, 2011-08-24 at 20:30 +0300, Avi Kivity wrote: >> > On 08/24/2011 07:19 PM, Sasha Levin wrote: >> > > This patch adds the following improvements: >> > > >> > > * Automatically start dhcpcd. Since we provide usermode netowrking >> > > we should make it fully transparent to the user. >> > >> > On my hosts, I have dhclient instead of dhcpd. >> > >> >> I was wondering if we should bring our own tiny dhcp client instead of >> assuming the host has one. >> >> Would it be better than assuming the host has it and then trying to >> figure out which one? >> > > You don't really need a dhcp client, since you already have a communication > channel - the kernel command line. Read the IP address and other info from > there, and poke it into the interface. > > There is also the ip= kernel parameter, but I don't know if it works with a > modular network driver. > > I suggest something like "kvmtool.nic.$macaddr=$ip/$netmask > kvmtool.defaultroute=$gateway" - this is interface name agnostic. We had "ip=dhcp" enabled for a while: https://github.com/penberg/linux-kvm/commit/f0aec23a91368e916a53e6072f2173bb481b1544 Unfortunately the option makes nfsroot override the 9p rootfs. I guess we could just fix that. Pekka -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html