Talk:Local testing with KVM, VDE and dnsmasq

From FAIWiki
Revision as of 18:45, 14 October 2009 by RusselJones (talk | contribs) (Add dhcpd.conf)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Note that you don't need dhcp3-server and tftpd-hpa which are pulled in by default.

Really? Doesn't the use of tap and -net nic stop the internal dhcp from working for you? I used the command line vdeq kvm -m 256 -net nic,vlan=1 -net vde,vlan=1,sock=/var/run/vde2/tap0.ctl -hda 4g-pxe-test.img -boot n -tftp /srv/fai/tftp/

And I just get "Searching for server (DHCP)....No IP address" with the second bit repeated many times. Perhaps another option is needed? I've tried a real DHCP server, listening on tap0's IP. It gets the discover packet, and sends an offer, but qemu's network card emulation seems to ignore it. I ran iptables -F and made sure all the policies are set to accept, so it's not that.

DHCPDISCOVER from 52:54:00:12:34:56 via tap0
DHCPOFFER on 172.25.25.10 to 52:54:00:12:34:56 via tap0

/etc/dhcp3/dhcpd.conf is as follows (minus comments)

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 172.25.25.0 netmask 255.255.255.0 {
	range 172.25.25.10 172.25.25.100;
	option routers 172.25.25.1;
}


/var/run/vde2/tap0.ctl didn't initially exist. I had to load the tun module before bringing the interface up. It's probably worth saying this in the docs.

Russell Jones 19:50, 13 October 2009 (CEST)