Hello! Thanks for your answer. Well, I think it has to ask for an IP as I have the same configuration in a different machine (with the same OS) and it works, there I see the DHCP packets and so on, but not here. And yeah, that pepito.conf file exists, this is its content: ##WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE ##OVERWRITTEN AND LOST. Changes to this configuration should be made using: ## virsh net-edit pepito ## or other application using the libvirt API. ## ## dnsmasq conf file created by libvirt strict-order user=libvirt-dnsmasq pid-file=/var/run/libvirt/network/pepito.pid except-interface=lo bind-dynamic interface=virbr2 dhcp-range=192.168.150.2,192.168.150.254 dhcp-no-override dhcp-authoritative dhcp-lease-max=253 dhcp-hostsfile=/var/lib/libvirt/dnsmasq/pepito.hostsfile addn-hosts=/var/lib/libvirt/dnsmasq/pepito.addnhosts El vie., 17 abr. 2020 a las 12:33, Michal Privoznik (<mprivozn@redhat.com>) escribió:> On 4/17/20 1:31 AM, Computers Issues wrote: > > Hello there, > > > > There is nothing obviously wrong with XMLs. Couple of things to try: > > 1) are you sure that the guest actually ask for an IP address? What > happens when you 'dhclient eth0' from inside the guest (or whatever the > equivalent is)? > > 2) is dnsmasq running on the host? If so, there should be > /var/lib/libvirt/dnsmasq/pepito.conf file, can you share its content? > > 3) Firewall. A lot of times when something network related doesn't work > I shut the firewall down and retry. It helps me rule one possible source > out. > > > Michal > >
On 4/17/20 12:44 PM, Computers Issues wrote:> Hello! > > Thanks for your answer. > > Well, I think it has to ask for an IP as I have the same configuration > in a different machine (with the same OS) and it works, there I see the > DHCP packets and so on, but not here.Well, do you actually see DHCP traffic on the virbr2 bridge? Because if not then the guest configuration is probably not correct.> And yeah, that pepito.conf file > exists, this is its content: > ##WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE > ##OVERWRITTEN AND LOST. Changes to this configuration should be made using: > ## virsh net-edit pepito > ## or other application using the libvirt API. > ## > ## dnsmasq conf file created by libvirt > strict-order > user=libvirt-dnsmasq > pid-file=/var/run/libvirt/network/pepito.pid > except-interface=lo > bind-dynamic > interface=virbr2 > dhcp-range=192.168.150.2,192.168.150.254 > dhcp-no-override > dhcp-authoritative > dhcp-lease-max=253 > dhcp-hostsfile=/var/lib/libvirt/dnsmasq/pepito.hostsfile > addn-hosts=/var/lib/libvirt/dnsmasq/pepito.addnhostsThis looks good. I suspect it is the guest not asking for DHCP. If it did, this configuration would assign an IP address. Michal
Hi, Okay! I'll check that and I'll tell what happened. Thanks El vie., 17 abr. 2020 a las 12:50, Michal Privoznik (<mprivozn@redhat.com>) escribió:> On 4/17/20 12:44 PM, Computers Issues wrote: > > Hello! > > > > Thanks for your answer. > > > > Well, I think it has to ask for an IP as I have the same configuration > > in a different machine (with the same OS) and it works, there I see the > > DHCP packets and so on, but not here. > > Well, do you actually see DHCP traffic on the virbr2 bridge? Because if > not then the guest configuration is probably not correct. > > > And yeah, that pepito.conf file > > exists, this is its content: > > ##WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO > BE > > ##OVERWRITTEN AND LOST. Changes to this configuration should be made > using: > > ## virsh net-edit pepito > > ## or other application using the libvirt API. > > ## > > ## dnsmasq conf file created by libvirt > > strict-order > > user=libvirt-dnsmasq > > pid-file=/var/run/libvirt/network/pepito.pid > > except-interface=lo > > bind-dynamic > > interface=virbr2 > > dhcp-range=192.168.150.2,192.168.150.254 > > dhcp-no-override > > dhcp-authoritative > > dhcp-lease-max=253 > > dhcp-hostsfile=/var/lib/libvirt/dnsmasq/pepito.hostsfile > > addn-hosts=/var/lib/libvirt/dnsmasq/pepito.addnhosts > > This looks good. I suspect it is the guest not asking for DHCP. If it > did, this configuration would assign an IP address. > > Michal > >
Hi, That was right. I mean, I've tried it at the same time in both machines I have (the one where it works and the other), and using tcpdump -i virbr2 in both ones, after creating the domain with virsh, showed that the right one is getting DHCP traffic, but there's no DHCP request or anything about DHCP in the one that is not working. El vie., 17 abr. 2020 a las 12:50, Michal Privoznik (<mprivozn@redhat.com>) escribió:> On 4/17/20 12:44 PM, Computers Issues wrote: > > Hello! > > > > Thanks for your answer. > > > > Well, I think it has to ask for an IP as I have the same configuration > > in a different machine (with the same OS) and it works, there I see the > > DHCP packets and so on, but not here. > > Well, do you actually see DHCP traffic on the virbr2 bridge? Because if > not then the guest configuration is probably not correct. > > > And yeah, that pepito.conf file > > exists, this is its content: > > ##WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO > BE > > ##OVERWRITTEN AND LOST. Changes to this configuration should be made > using: > > ## virsh net-edit pepito > > ## or other application using the libvirt API. > > ## > > ## dnsmasq conf file created by libvirt > > strict-order > > user=libvirt-dnsmasq > > pid-file=/var/run/libvirt/network/pepito.pid > > except-interface=lo > > bind-dynamic > > interface=virbr2 > > dhcp-range=192.168.150.2,192.168.150.254 > > dhcp-no-override > > dhcp-authoritative > > dhcp-lease-max=253 > > dhcp-hostsfile=/var/lib/libvirt/dnsmasq/pepito.hostsfile > > addn-hosts=/var/lib/libvirt/dnsmasq/pepito.addnhosts > > This looks good. I suspect it is the guest not asking for DHCP. If it > did, this configuration would assign an IP address. > > Michal > >