gPXE

Hello,

Over the last few months I have been hunting down little quirks in our environment that have prevented foreman from doing all the things it says it will and believe me there were more than one or two, but finally today we got a proper build of a KVM virt , physical hosts were a snap bar the slight inconvenience of not being able to get static ip settings working properly.

Today I noticed that when we build a virtual machine and hit submit, we get to the host page from there to the console and we watch it boot. The console output shows dhcp timing out and tcpdumps on the dhcp host show no messages being received. Is this an issue with libvirtd? Is there another way this can be done without gPXE that I am missing ? I am not entirely sure where to start the hunt but if anyone could share any experiences they might have - our environment consists only of CentOS and Redhat 5/6 some solaris which are built separately at the moment.

Thank You

Short answer: it depends :slight_smile:

If you're running your hosts on a virtual network inside libvirt, then
by default libvirt should spin up a dnsmasq process attached to the
network device (say, virbr0) so I'd look and see if that's running.
Also, check the configuration of the network itself to see if DHCP is
enabled on that device. For comparision, I have:

[root@sapphire ~]# cat /etc/libvirt/qemu/networks/default.xml
<network>
<name>default</name>
<uuid>2f2a01fe-fe6c-4f17-9f6d-2fb9d0ce6bc5</uuid>
<forward mode='nat'/>
<bridge name='virbr0' stp='on' delay='0' />
<mac address='52:54:00:27:1A:97'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254' />
<bootp file='/pxelinux.0' server='192.168.122.1' />
</dhcp>
</ip>
</network>

Of course, if you're not using the dnsmasq built-in to libvirt, then
you'll need to go troubleshoot whatever machine is running your DHCP
service.

Alternatively, if you're bridging your KVM hosts onto the physical
network, then they should receive DHCP from your main DHCP server like
any other host. I do this with another of my libvirt hosts, which
works great.

Hope that helps, if not, more details of your setup will be needed :slight_smile:
Greg

ยทยทยท On 20 December 2012 10:25, Luke Kearney wrote: > Hello, > > Over the last few months I have been hunting down little quirks in our environment that have prevented foreman from doing all the things it says it will and believe me there were more than one or two, but finally today we got a proper build of a KVM virt , physical hosts were a snap bar the slight inconvenience of not being able to get static ip settings working properly. > > Today I noticed that when we build a virtual machine and hit submit, we get to the host page from there to the console and we watch it boot. The console output shows dhcp timing out and tcpdumps on the dhcp host show no messages being received. Is this an issue with libvirtd? Is there another way this can be done without gPXE that I am missing ? I am not entirely sure where to start the hunt but if anyone could share any experiences they might have - our environment consists only of CentOS and Redhat 5/6 some solaris which are built separately at the moment.