On Thu, May 16, 2024 at 10:00:20AM -0400, Johan Huldtgren wrote:
> hello,

Removed a lot of text to keep this under control.
 
> > > > >> > Relevant configs:
> > > > >> >
> > > > >> > # host (OpenBSD 7.5 + syspatches)
> > > > >> >
> > > > >> > $ doas cat /etc/vm.conf
> > > > >> > vm "guest.vm" {
> > > > >> >         disk "/home/vm/guest.img"
> > > > >> >         owner johan
> > > > >> >         memory 4G
> > > > >> >         local interface tap0
> > > > >>

This config uses 'local interface tap0' which runs the simple DHCP/BOOTP
server inside of vmd(8). See vm.conf(5) for more info about this.

> > > > >> Why are you using "local interface tap0" and then putting tap0 in a
> > > > >> bridge(4) with a trunk(4)? I'm not an networking person but that 
> > > > >> seems
> > > > >> odd to me.
> > > > >
> > > > > Entierly possible I'm doing this wrong. This is the only setup I have
> > > > > where I tried using local interface, everywhere else I define the 
> > > > > switch
> > > > > so I probably just carried that part of the config over. I modified it
> > > > > to normalize my config so it's similar to all my others.
> > > > >
> > > > > $ doas cat /etc/vm.conf
> > > > >
> > > > > switch "uplink" {
> > > > >         interface bridge0
> > > > > }
> > > > >
> > > > > vm "guest.vm" {
> > > > >         disk "/home/vm/gallery.img"
> > > > >         owner johan
> > > > >         memory 3.5G
> > > > >         interface tap0 {
> > > > >                 switch "uplink"
> > > > >         }
> > > > > }

This config is not using 'local' and so vmd(8) does not intercept DHCP
packets. Instead the expectation is that if you use DHCP that you run your
own DHCP server somewhere.

So to come back to this:

> > I'm confused. You changed the config away from local dhcp intercept to
> > using bridge0. So are you running a dhcp server on and interface connected
> > to bridge0?
> 
> I changed the config to be consistent with the examples in vm.conf and my
> other setups. I'm not running any dhcp server myself just relaying on
> whatever vmd provides.

But you disabled the DHCP server from vmd in your new config. Instead you
probably bridged the tap interface to your ethernet interface. If there is
no other DHCP server around then the vm guest will never get a response.
This is what the tcpdump shows.
 
> > It seems there is an issue with the vmm internal dhcp (which is more
> > bootp) server. So the debug output would be helpful for that case since
> > there is an assumption that the dhcp packets are somehow lost.
> 
> Would this require building a new kernel with VMD_DEBUG? Or would this be
> turned on somewhere else?

Change your config back to 'local interface tap0' and rerun vmd -dvv
Then we may actually see what the vmd supplied DHCP server does.

-- 
:wq Claudio

Reply via email to