Setting up a DHCP test environment in QEMU

My current project must run against a DHCP server which has to have a fairly exotic configuration (not really one I'd want running on my home network), and I want to be able to blow away and re-create the client constantly as I test installation procedures and the like.  So, since we're on Fedora 10 (server), I've set up a little QEMU environment like this:

  • base read-only Fedora 10 minimal install with users and basic config (qcow2)
  • overlay one, the DHCP server, with one "user stack" nic and one vlan nic
  • overlay two, the client server, same network config

but after getting all that set up, I can't get the silly vlan nic to come up on the DHCP server :( .  The idea is that I'll write scripts to blow away and recreate the second overlay then install the software to test into it... but this silly bug has just blocked the whole process.

The ifup scripts are complaining that another machine already has the 10.220.* ip addresses I'm configuring (unlikely, given that there's just to the two machines on the vlan).  I expect it is some silly Fedora, SELinux, or Qemu thing, or maybe a conflict between those... now I just have to narrow that down a little :) .

[Update] Fixed.  Don't get "cute" with your MAC addresses in QEMU.  I'd assigned the MAC 01:02:03:04:05:06 to the DHCP server's back-end nic, letting QEMU auto-assign the MAC instead got it working.

Comments

  1. T Middleton

    T Middleton on 05/04/2010 8:37 a.m. #

    I used to do use Qemu stuff back when working on the hotspot stuff. Used overlays for development, and would build entire images to test the installer (which installed OS + software). Really liked Qemu for it's amazing portability and general simplicity. But the disk I/O was horrifically slow back then (is it better now?). These days I use VirtualBox for a bunch of stuff (though not really for development work). So much better. And Sun's non-open-source version with its excellent USB support is very handy at times. Not trying to urge you off Qemu or anything like that. I have fond memories of Qemu. It really helped me out way back in the day. Just rambling....

  2. Mike C. Fletcher

    Mike C. Fletcher on 05/04/2010 1:36 p.m. #

    I used Qemu and VirtualBox pretty extensively back when I was working for the OLPC, but most of the stuff we were doing was network or graphics-system limited, not disk-limited, so can't say if the disks are any faster. Same with the current stuff, network-bound rather than disk-bound, so no real input on the speed there.

Comments are closed.

Pingbacks

Pingbacks are closed.