hello, On 2024-05-16 16:14, Claudio Jeker wrote: > 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.
Thank you very much for this explanation, I guess everywhere else I have vmd there is a dhcp server around so it never occured to me. So vm.conf has been updated: $ doas cat /etc/vm.conf vm "guest.vm" { disk "/home/vm/gallery.img" owner johan memory 3.5G local interface tap0 } # $(which vmd) -dvv vmd: startup vmd: vm_register: registering vm 1 vmd: /etc/vm.conf:19: vm "guest.vm" registered (enabled) warning: macro 'sets' not used vmd: vmd_configure: setting staggered start configuration to parallelism: 4 and delay: 30 vmd: vmd_configure: starting vms in staggered fashion vmd: start_vm_batch: starting batch of 4 vms vmd: vm_opentty: vm guest.vm tty /dev/ttyp1 uid 1000 gid 4 mode 620 vmd: start_vm_batch: done starting vms vmm: config_getconfig: vmm retrieving config vmm: vm_register: registering vm 1 control: config_getconfig: control retrieving config agentx: config_getconfig: agentx retrieving config priv: config_getconfig: priv retrieving config vmd: vm_priv_ifconfig: interface tap0 description vm1-if0-guest.vm vmd: vm_priv_ifconfig: interface tap0 address 100.64.1.2/31 vmd: started guest.vm (vm 1) successfully, tty /dev/ttyp1 vm/guest.vm: loadfile_bios: loaded BIOS image vm/guest.vm: pic_set_elcr: setting level triggered mode for irq 3 vm/guest.vm: pic_set_elcr: setting level triggered mode for irq 5 vm/guest.vm: virtio_init: vm "guest.vm" vio0 lladdr fe:e1:bb:d1:2a:29, local vm/guest.vm: pic_set_elcr: setting level triggered mode for irq 6 vm/guest.vm: guest.vm: launching vioblk0 vm/guest.vm: virtio_dev_launch: sending 'd' type device struct vm/guest.vm: virtio_dev_launch: sending vm message for 'guest.vm' vm/guest.vm/vioblk: vioblk_main: got viblk dev. num disk fds = 1, sync fd = 16, async fd = 18, capacity = 0 seg_max = 126, vmm fd = 5 vm/guest.vm/vioblk0: vioblk_main: initialized vioblk0 with raw image (capacity=83886080) vm/guest.vm/vioblk0: vioblk_main: wiring in async vm event handler (fd=18) vm/guest.vm/vioblk0: vm_device_pipe: initializing 'd' device pipe (fd=18) vm/guest.vm/vioblk0: vioblk_main: wiring in sync channel handler (fd=16) vm/guest.vm/vioblk0: vioblk_main: telling vm guest.vm device is ready vm/guest.vm/vioblk0: vioblk_main: sending heartbeat vm/guest.vm: virtio_dev_launch: receiving reply vm/guest.vm: virtio_dev_launch: device reports ready via sync channel vm/guest.vm: vm_device_pipe: initializing 'd' device pipe (fd=17) vm/guest.vm: guest.vm: launching vionet0 vm/guest.vm: virtio_dev_launch: sending 'n' type device struct vm/guest.vm: virtio_dev_launch: sending vm message for 'guest.vm' vm/guest.vm/vionet: vionet_main: got vionet dev. tap fd = 8, syncfd = 16, asyncfd = 19, vmm fd = 5 vm/guest.vm/vionet0: vionet_main: wiring in async vm event handler (fd=19) vm/guest.vm/vionet0: vm_device_pipe: initializing 'n' device pipe (fd=19) vm/guest.vm/vionet0: vionet_main: wiring in sync channel handler (fd=16) vm/guest.vm/vionet0: vionet_main: telling vm guest.vm device is ready vm/guest.vm/vionet0: vionet_main: sending async ready message vm/guest.vm: virtio_dev_launch: receiving reply vm/guest.vm: virtio_dev_launch: device reports ready via sync channel vm/guest.vm: vm_device_pipe: initializing 'n' device pipe (fd=18) vm/guest.vm: pic_set_elcr: setting level triggered mode for irq 7 vm/guest.vm: run_vm: starting 1 vcpu thread(s) for vm guest.vm vm/guest.vm: vcpu_reset: resetting vcpu 0 for vm 10 vm/guest.vm: run_vm: waiting on events for VM guest.vm vm/guest.vm: guest.vm: received tap addr fe:e1:ba:d0:78:97 for nic 0 vm/guest.vm: handle_dev_msg: device reports ready vm/guest.vm: handle_dev_msg: device reports ready vm/guest.vm/vionet0: dev_dispatch_vm: set hostmac vm/guest.vm: vcpu_exit_fw_cfg: selector 0x0000 vm/guest.vm: vcpu_exit_fw_cfg: selector 0x0001 vm/guest.vm: fw_cfg_handle_dma: selector 0x0019 vm/guest.vm: fw_cfg_file_dir: file directory with 2 files vm/guest.vm: 100B 0020 etc/e820 vm/guest.vm: 4B 0021 etc/screen-and-debug vm/guest.vm: vcpu_exit_fw_cfg: selector 0x0020 vm/guest.vm: fw_cfg_select_file: accessing file etc/e820 vm/guest.vm: fw_cfg_handle_dma: selector 0x000d vm/guest.vm: fw_cfg_select: unhandled selector d vm/guest.vm: fw_cfg_handle_dma: selector 0x000f vm/guest.vm: fw_cfg_select: unhandled selector f vm/guest.vm: fw_cfg_handle_dma: selector 0x8000 vm/guest.vm: fw_cfg_select: unhandled selector 8000 vm/guest.vm: fw_cfg_handle_dma: selector 0x8001 vm/guest.vm: fw_cfg_select: unhandled selector 8001 vm/guest.vm: fw_cfg_handle_dma: selector 0x0019 vm/guest.vm: fw_cfg_file_dir: file directory with 2 files vm/guest.vm: 100B 0020 etc/e820 vm/guest.vm: 4B 0021 etc/screen-and-debug vm/guest.vm: fw_cfg_handle_dma: selector 0x0004 vm/guest.vm: i8259_write_datareg: master pic, reset IRQ vector to 0x8 vm/guest.vm: i8259_write_datareg: slave pic, reset IRQ vector to 0x70 vm/guest.vm: fw_cfg_handle_dma: selector 0x000f vm/guest.vm: fw_cfg_select: unhandled selector f vm/guest.vm: fw_cfg_handle_dma: selector 0x0005 vm/guest.vm: fw_cfg_select: unhandled selector 5 vm/guest.vm: fw_cfg_handle_dma: selector 0x0021 vm/guest.vm: fw_cfg_select_file: accessing file etc/screen-and-debug vm/guest.vm: vcpu_process_com_lcr: set baudrate = 115200 vm/guest.vm: vcpu_process_com_lcr: set baudrate = 115200 vm/guest.vm: vcpu_process_com_lcr: set baudrate = 115200 vm/guest.vm: vcpu_process_com_lcr: set baudrate = 115200 vm/guest.vm: i8259_write_datareg: master pic, reset IRQ vector to 0x20 vm/guest.vm: i8259_write_datareg: slave pic, reset IRQ vector to 0x28 vm/guest.vm/vionet0: read_pipe_main: resetting virtio network device 0 vmd: vmd_dispatch_vmm: running vm: 1, vm_state: 0x1 vm/guest.vm: vcpu_process_com_lcr: set baudrate = 115200 vm/guest.vm: vcpu_exit_i8253_misc: counter 2 clear, returning 0x0 vm/guest.vm: vcpu_exit_i8253_misc: discarding data written to PIT misc port vm/guest.vm: vcpu_exit_i8253_misc: counter 2 clear, returning 0x0 vm/guest.vm: vcpu_exit_i8253_misc: discarding data written to PIT misc port vm/guest.vm: vcpu_exit_i8253_misc: counter 2 clear, returning 0x0 vm/guest.vm: vcpu_exit_eptviolation: fault already handled vm/guest.vm: vcpu_exit_eptviolation: fault already handled <snip> vm/guest.vm/vionet0: read_pipe_main: resetting virtio network device 0 thanks, .jh