Re: DHCP in vmm guest
Hello guys, I am testing Nested OpenBSD VMM -current under Vmware ESXI 6.5 and the console aleatory freezes ( the VM still working as well as "~^D" ( reattach to console but can't interact through ) Error is: Jun 16 18:55:08 vmm vmd[94945]: vcpu_process_com_data: guest reading com1 when not ready Jun 16 18:56:21 vmm last message repeated 22 times Also "local interface" -> vm.conf" or -L -> vmcl works with OpenBSD guest and linux guest running dhcpcd ( http://roy.marples.name/projects/dhcpcd/) but dns resolution does not work ( pointing another DNS works ) . Furthermore, udhcpc ( tested with Alpine Linux ) does not get address Error: localhost:~# udhcpc eth0 udhcpc: started, v1.26.2 udhcpc: sending discover udhcpc: no message type option, ignoring packet * Just trying to contribute * Best, dmesg: OpenBSD 6.1-current (GENERIC.MP) #0: Fri Jun 16 16:25:18 CEST 2017 r...@vmm.nested.com:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 6425608192 (6127MB) avail mem = 6225076224 (5936MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe0010 (248 entries) bios0: vendor Phoenix Technologies LTD version "6.00" date 04/05/2016 bios0: VMware, Inc. VMware Virtual Platform acpi0 at bios0: rev 2 acpi0: sleep states S0 S1 S4 S5 acpi0: tables DSDT FACP BOOT APIC MCFG SRAT HPET WAET acpi0: wakeup devices PCI0(S3) USB_(S1) P2P0(S3) S1F0(S3) S2F0(S3) S8F0(S3) S16F(S3) S18F(S3) S22F(S3) S23F(S3) S24F(S3) S25F(S3) PE40(S3) S1F0(S3) PE50(S3) S1F0(S3) [...] acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Xeon(R) CPU E3-1275 v5 @ 3.60GHz, 3600.42 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,SSE3,PCLMUL,VMX,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,X SAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,SENSOR,ARAT cpu0: 256KB 64b/line 8-way L2 cache cpu0: TSC frequency 3600415280 Hz cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges cpu0: apic clock running at 65MHz cpu1 at mainbus0: apid 2 (application processor) cpu1: Intel(R) Xeon(R) CPU E3-1275 v5 @ 3.60GHz, 3600.15 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,SSE3,PCLMUL,VMX,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,X SAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,SENSOR,ARAT cpu1: 256KB 64b/line 8-way L2 cache cpu1: smt 0, core 0, package 2 cpu2 at mainbus0: apid 4 (application processor) cpu2: Intel(R) Xeon(R) CPU E3-1275 v5 @ 3.60GHz, 3600.16 MHz cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,SSE3,PCLMUL,VMX,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,X SAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,SENSOR,ARAT cpu2: 256KB 64b/line 8-way L2 cache cpu2: smt 0, core 0, package 4 cpu3 at mainbus0: apid 6 (application processor) cpu3: Intel(R) Xeon(R) CPU E3-1275 v5 @ 3.60GHz, 3600.12 MHz cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,SSE3,PCLMUL,VMX,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,X SAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,SENSOR,ARAT cpu3: 256KB 64b/line 8-way L2 cache cpu3: smt 0, core 0, package 6 ioapic0 at mainbus0: apid 1 pa 0xfec0, version 11, 24 pins acpimcfg0 at acpi0 addr 0xf000, bus 0-127 acpihpet0 at acpi0: 14318179 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpicpu0 at acpi0: C1(@1 halt!) acpicpu1 at acpi0: C1(@1 halt!) acpicpu2 at acpi0: C1(@1 halt!) acpicpu3 at acpi0: C1(@1 halt!) "PNP0001" at acpi0 not configured "PNP0303" at acpi0 not configured "VMW0003" at acpi0 not configured "PNP0A05" at acpi0 not configured acpiac0 at acpi0: AC unit online pvbus0 at mainbus0: VMware vmt0 at pvbus0 pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x01 ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x01 pci1 at ppb0 bus 1 pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x08 pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility pciide0: channel 0 disabled (no drives) pciide0: channel 1 disabled (no drives) piixpm0 at pci0 dev 7 function 3 "Intel 82371AB Power" rev 0x08: SMBus disabled "VMware VMCI" rev 0x10 at pci0 dev 7 functio
Re: DHCP in vmm guest
> On 04.05.2017, at 16:13, Jiri B wrote: > > On Thu, May 04, 2017 at 03:49:27PM +0200, Reyk Floeter wrote: >> So you have the VM interface and the host interface on a bridge: >> dhclient on the host "steals" all DHCP packets via BPF. >> >> Try to pkill dhclient on the host and the VM should be able to get DHCP. >> >> There is currently no solution for that, it is the way our dhclient works, >> you can try to run the VM on a NAT'ed bridge or use "-L" local interfaces. >> >> Reyk > > What about using vether with bridge and having host's dhclient using > vether? > > What about having dhcrelay and relaying VM's dhcp to upstream dhcp server? > > j. You should also try "local interface" or "-L" with -current. It doesn't need bridge or vether or dhcpd, just forwarding and pf on the host. Reyk
Re: DHCP in vmm guest
This is why I love misc@. And Francois: If I had known a few days ago what Reyk just said, I would have noted it. I should probably go back and edit my blog post. I spent 4 or 5 hours myself trying unsuccessfully bridge it. I had it working once in -CURRENT in October, but never could figure it out once I upgraded to 6.1. IO must've manually assigned an address back then, whereas I was using dhclient on bge0 last week. On Thu, May 4, 2017 at 8:49 AM, Reyk Floeter wrote: > dhclient on the host "steals" all DHCP packets via BPF. > >
Re: DHCP in vmm guest
On Thu, May 4, 2017 at 4:13 PM, Jiri B wrote: > On Thu, May 04, 2017 at 03:49:27PM +0200, Reyk Floeter wrote: >> So you have the VM interface and the host interface on a bridge: >> dhclient on the host "steals" all DHCP packets via BPF. >> >> Try to pkill dhclient on the host and the VM should be able to get DHCP. >> >> There is currently no solution for that, it is the way our dhclient works, >> you can try to run the VM on a NAT'ed bridge or use "-L" local interfaces. > > What about using vether with bridge and having host's dhclient using > vether? That is my solution to the same problem. Essentially I've had to make my "primary" interface into a vether. Without this bug, I could have used em2 (in this case) directly. Now I use vether and em2 in a bridge.
Re: DHCP in vmm guest
On Thu, May 04, 2017 at 03:49:27PM +0200, Reyk Floeter wrote: > So you have the VM interface and the host interface on a bridge: > dhclient on the host "steals" all DHCP packets via BPF. > > Try to pkill dhclient on the host and the VM should be able to get DHCP. > > There is currently no solution for that, it is the way our dhclient works, > you can try to run the VM on a NAT'ed bridge or use "-L" local interfaces. > > Reyk What about using vether with bridge and having host's dhclient using vether? What about having dhcrelay and relaying VM's dhcp to upstream dhcp server? j.
Re: DHCP in vmm guest
So you have the VM interface and the host interface on a bridge: dhclient on the host "steals" all DHCP packets via BPF. Try to pkill dhclient on the host and the VM should be able to get DHCP. There is currently no solution for that, it is the way our dhclient works, you can try to run the VM on a NAT'ed bridge or use "-L" local interfaces. Reyk > On 04.05.2017, at 14:51, Francois Stephany wrote: > > Hi, > > I'm new to OpenBSD and I'm trying a simple setup where a VMM guest has > access to the network via tap and bridge. The host uses a wired connection > and gets its network address with DHCP. > > Here's my /etc/vm.conf: > > switch "vms_switch" { >interface bridge0 >add bge0 > } > > vm "vm.test" { >memory 1G >boot /home/fstephany/bsd.rd >disk /var/vms/fstephany/vmtest-disk.img >owner fstephany >interface tap { >switch "vms_switch" >} >disable > } > > > I've stopped vmd with #rcctl stop vmd > and started it manually: > > # vmd -dvv > startup > /etc/vm.conf:4: switch "vms_switch" registered > /etc/vm.conf:15: vm "vm.test" registered (disabled) > vm_priv_brconfig: interface bridge0 description switch1-vms_switch > vm_priv_brconfig: interface bridge0 add bge0 > vmd_configure: not creating vm vm.test (disabled) > vm_opentty: vm vm.test tty /dev/ttyp1 uid 0 gid 4 mode 620 > vm_priv_ifconfig: interface tap0 description vm1-if0-vm.test > vm_priv_ifconfig: interface bridge0 add tap0 > vm.test: started vm 1 successfully, tty /dev/ttyp1 > loadfile_elf: loaded ELF kernel > run_vm: initializing hardware for vm vm.test > virtio_init: vm "vm.test" vio0 lladdr fe:e1:bb:d1:6d:23 > run_vm: starting vcpu threads for vm vm.test > vcpu_reset: resetting vcpu 0 for vm 5 > run_vm: waiting on events for VM vm.test > i8259_write_datareg: master pic, reset IRQ vector to 0x20 > i8259_write_datareg: slave pic, reset IRQ vector to 0x28 > vcpu_exit_i8253: channel 0 reset, mode=7, start=11932 > virtio_blk_io: device reset > virtio_net_io: device reset > vionet queue notify - no space, dropping packet > vionet queue notify - no space, dropping packet > vionet queue notify - no space, dropping packet > vionet queue notify - no space, dropping packet > vionet queue notify - no space, dropping packet > virtio_net_io: device reset > > > Here's what happens when the installer tries to get a network address: > > # vmctl status > ID PID VCPUS MAXMEM CURMEM TTYOWNER NAME >1 - 11.0G - -fstephany vm.test > # vmctl start vm.test -c > Connected to /dev/ttyp1 (speed 9600) > > Copyright (c) 1982, 1986, 1989, 1991, 1993 >The Regents of the University of California. All rights reserved. > Copyright (c) 1995-2017 OpenBSD. All rights reserved. > https://www.OpenBSD.org > > OpenBSD 6.1-current (RAMDISK_CD) #41: Tue May 2 21:13:30 MDT 2017 >dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD > real mem = 1056964608 (1008MB) > avail mem = 1021235200 (973MB) > mainbus0 at root > bios0 at mainbus0 > acpi at bios0 not configured > cpu0 at mainbus0: (uniprocessor) > cpu0: Intel(R) Celeron(R) CPU G1610T @ 2.30GHz, 2295.33 MHz > cpu0: > FPU,VME,DE,PSE,MSR,PAE,MCE,CX8,SEP,PGE,MCA,CMOV,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,XSAVE,HV,NXE,LONG,LAHF,FSGSBASE,SMEP,ERMS > cpu0: 256KB 64b/line 8-way L2 cache > pvbus0 at mainbus0: OpenBSD > pci0 at mainbus0 bus 0 > pchb0 at pci0 dev 0 function 0 "OpenBSD VMM Host" rev 0x00 > virtio0 at pci0 dev 1 function 0 "Qumranet Virtio RNG" rev 0x00 > viornd0 at virtio0 > virtio0: irq 3 > virtio1 at pci0 dev 2 function 0 "Qumranet Virtio Storage" rev 0x00 > vioblk0 at virtio1 > scsibus0 at vioblk0: 2 targets > sd0 at scsibus0 targ 0 lun 0: SCSI3 0/direct fixed > sd0: 4096MB, 512 bytes/sector, 8388608 sectors > virtio1: irq 5 > virtio2 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00 > vio0 at virtio2: address fe:e1:bb:d1:6d:23 > virtio2: irq 7 > virtio3 at pci0 dev 4 function 0 "OpenBSD VMM Control" rev 0x00 > virtio3: no matching child driver; not configured > isa0 at mainbus0 > com0 at isa0 port 0x3f8/8 irq 4: ns8250, no fifo > com0: console > softraid0 at root > scsibus1 at softraid0: 256 targets > root on rd0a swap on rd0b dump on rd0b > > erase ^?, werase ^W, kill ^U, intr ^C, status ^T > > Welcome to the OpenBSD/amd64 6.1 installation program. > (I)nstall, (U)pgrade, (A)utoinstall or (S)hell? I > At any prompt except password prompts you can escape to a shell by > typing '!'. Default answers are shown in []'s and are selected by > pressing RETURN. You can exit this program at any time by pressing > Control-C, but this can leave your system in an inconsistent state. > > Terminal type? [vt220] > System hostname? (short form, e.g. 'foo') vmtest > > Available network interfaces are: vio0 vlan0. > Which network interface do you wish to configure? (or 'done') [vio0] > IPv4 address for vio0? (or 'dhcp'
Re: DHCP in vmm guest
That was it. Thanks! I've set a fixed IP address to bg0 in the host: # ifconfig bge0 192.168.0.9 255.255.255.0 Now the guest can DHCP: # vmctl start vm.test -c Connected to /dev/ttyp1 (speed 9600) Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2017 OpenBSD. All rights reserved. https://www.OpenBSD.org OpenBSD 6.1-current (RAMDISK_CD) #41: Tue May 2 21:13:30 MDT 2017 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD real mem = 1056964608 (1008MB) avail mem = 1021235200 (973MB) mainbus0 at root bios0 at mainbus0 acpi at bios0 not configured cpu0 at mainbus0: (uniprocessor) cpu0: Intel(R) Celeron(R) CPU G1610T @ 2.30GHz, 2295.37 MHz cpu0: FPU,VME,DE,PSE,MSR,PAE,MCE,CX8,SEP,PGE,MCA,CMOV,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,XSAVE,HV,NXE,LONG,LAHF,FSGSBASE,SMEP,ERMS cpu0: 256KB 64b/line 8-way L2 cache pvbus0 at mainbus0: OpenBSD pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "OpenBSD VMM Host" rev 0x00 virtio0 at pci0 dev 1 function 0 "Qumranet Virtio RNG" rev 0x00 viornd0 at virtio0 virtio0: irq 3 virtio1 at pci0 dev 2 function 0 "Qumranet Virtio Storage" rev 0x00 vioblk0 at virtio1 scsibus0 at vioblk0: 2 targets sd0 at scsibus0 targ 0 lun 0: SCSI3 0/direct fixed sd0: 4096MB, 512 bytes/sector, 8388608 sectors virtio1: irq 5 virtio2 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00 vio0 at virtio2: address fe:e1:bb:d1:44:af virtio2: irq 7 virtio3 at pci0 dev 4 function 0 "OpenBSD VMM Control" rev 0x00 virtio3: no matching child driver; not configured isa0 at mainbus0 com0 at isa0 port 0x3f8/8 irq 4: ns8250, no fifo com0: console softraid0 at root scsibus1 at softraid0: 256 targets root on rd0a swap on rd0b dump on rd0b erase ^?, werase ^W, kill ^U, intr ^C, status ^T Welcome to the OpenBSD/amd64 6.1 installation program. (I)nstall, (U)pgrade, (A)utoinstall or (S)hell? I At any prompt except password prompts you can escape to a shell by typing '!'. Default answers are shown in []'s and are selected by pressing RETURN. You can exit this program at any time by pressing Control-C, but this can leave your system in an inconsistent state. Terminal type? [vt220] System hostname? (short form, e.g. 'foo') vmtest Available network interfaces are: vio0 vlan0. Which network interface do you wish to configure? (or 'done') [vio0] IPv4 address for vio0? (or 'dhcp' or 'none') [dhcp] DHCPDISCOVER on vio0 - interval 1 DHCPOFFER from 192.168.0.1 (6c:b0:ce:3f:2e:b7) DHCPREQUEST on vio0 to 255.255.255.255 DHCPACK from 192.168.0.1 (6c:b0:ce:3f:2e:b7) bound to 192.168.0.13 -- renewal in 1800 seconds. IPv6 address for vio0? (or 'autoconf' or 'none') [none] Do you have any idea how to avoid this issue? On Thu, May 4, 2017 at 3:27 PM, trondd wrote: > On Thu, May 4, 2017 8:51 am, Francois Stephany wrote: > > Hi, > > > > I'm new to OpenBSD and I'm trying a simple setup where a VMM guest has > > access to the network via tap and bridge. The host uses a wired > connection > > and gets its network address with DHCP. > > > > Here's my /etc/vm.conf: > > > > switch "vms_switch" { > > interface bridge0 > > add bge0 > > } > > > > vm "vm.test" { > > memory 1G > > boot /home/fstephany/bsd.rd > > disk /var/vms/fstephany/vmtest-disk.img > > owner fstephany > > interface tap { > > switch "vms_switch" > > } > > disable > > } > > > > > > I've stopped vmd with #rcctl stop vmd > > and started it manually: > > > > # vmd -dvv > > startup > > /etc/vm.conf:4: switch "vms_switch" registered > > /etc/vm.conf:15: vm "vm.test" registered (disabled) > > vm_priv_brconfig: interface bridge0 description switch1-vms_switch > > vm_priv_brconfig: interface bridge0 add bge0 > > vmd_configure: not creating vm vm.test (disabled) > > vm_opentty: vm vm.test tty /dev/ttyp1 uid 0 gid 4 mode 620 > > vm_priv_ifconfig: interface tap0 description vm1-if0-vm.test > > vm_priv_ifconfig: interface bridge0 add tap0 > > vm.test: started vm 1 successfully, tty /dev/ttyp1 > > loadfile_elf: loaded ELF kernel > > run_vm: initializing hardware for vm vm.test > > virtio_init: vm "vm.test" vio0 lladdr fe:e1:bb:d1:6d:23 > > run_vm: starting vcpu threads for vm vm.test > > vcpu_reset: resetting vcpu 0 for vm 5 > > run_vm: waiting on events for VM vm.test > > i8259_write_datareg: master pic, reset IRQ vector to 0x20 > > i8259_write_datareg: slave pic, reset IRQ vector to 0x28 > > vcpu_exit_i8253: channel 0 reset, mode=7, start=11932 > > virtio_blk_io: device reset > > virtio_net_io: device reset > > vionet queue notify - no space, dropping packet > > vionet queue notify - no space, dropping packet > > vionet queue notify - no space, dropping packet > > vionet queue notify - no space, dropping packet > > vionet queue notify - no space, dropping packet > > virtio_net_io: device reset > > > > > > Here's what happens when the installe
Re: DHCP in vmm guest
The dhcp is running on the modem/router provided by my ISP. That makes me think that I've setup a rule in its web interface so the OpenBSD host always get the same IP address. On Thu, May 4, 2017 at 3:27 PM, Jiri B wrote: > > I'm new to OpenBSD and I'm trying a simple setup where a VMM guest has > > access to the network via tap and bridge. The host uses a wired > connection > > and gets its network address with DHCP. > > where is dhcpd running? on the host? have you tried tcpdump to see if dhcp > discover traffic is visible there? > > j. >
Re: DHCP in vmm guest
> I'm new to OpenBSD and I'm trying a simple setup where a VMM guest has > access to the network via tap and bridge. The host uses a wired connection > and gets its network address with DHCP. where is dhcpd running? on the host? have you tried tcpdump to see if dhcp discover traffic is visible there? j.
Re: DHCP in vmm guest
On Thu, May 4, 2017 8:51 am, Francois Stephany wrote: > Hi, > > I'm new to OpenBSD and I'm trying a simple setup where a VMM guest has > access to the network via tap and bridge. The host uses a wired connection > and gets its network address with DHCP. > > Here's my /etc/vm.conf: > > switch "vms_switch" { > interface bridge0 > add bge0 > } > > vm "vm.test" { > memory 1G > boot /home/fstephany/bsd.rd > disk /var/vms/fstephany/vmtest-disk.img > owner fstephany > interface tap { > switch "vms_switch" > } > disable > } > > > I've stopped vmd with #rcctl stop vmd > and started it manually: > > # vmd -dvv > startup > /etc/vm.conf:4: switch "vms_switch" registered > /etc/vm.conf:15: vm "vm.test" registered (disabled) > vm_priv_brconfig: interface bridge0 description switch1-vms_switch > vm_priv_brconfig: interface bridge0 add bge0 > vmd_configure: not creating vm vm.test (disabled) > vm_opentty: vm vm.test tty /dev/ttyp1 uid 0 gid 4 mode 620 > vm_priv_ifconfig: interface tap0 description vm1-if0-vm.test > vm_priv_ifconfig: interface bridge0 add tap0 > vm.test: started vm 1 successfully, tty /dev/ttyp1 > loadfile_elf: loaded ELF kernel > run_vm: initializing hardware for vm vm.test > virtio_init: vm "vm.test" vio0 lladdr fe:e1:bb:d1:6d:23 > run_vm: starting vcpu threads for vm vm.test > vcpu_reset: resetting vcpu 0 for vm 5 > run_vm: waiting on events for VM vm.test > i8259_write_datareg: master pic, reset IRQ vector to 0x20 > i8259_write_datareg: slave pic, reset IRQ vector to 0x28 > vcpu_exit_i8253: channel 0 reset, mode=7, start=11932 > virtio_blk_io: device reset > virtio_net_io: device reset > vionet queue notify - no space, dropping packet > vionet queue notify - no space, dropping packet > vionet queue notify - no space, dropping packet > vionet queue notify - no space, dropping packet > vionet queue notify - no space, dropping packet > virtio_net_io: device reset > > > Here's what happens when the installer tries to get a network address: > > # vmctl status >ID PID VCPUS MAXMEM CURMEM TTYOWNER NAME > 1 - 11.0G - -fstephany vm.test > # vmctl start vm.test -c > Connected to /dev/ttyp1 (speed 9600) > > Copyright (c) 1982, 1986, 1989, 1991, 1993 > The Regents of the University of California. All rights reserved. > Copyright (c) 1995-2017 OpenBSD. All rights reserved. > https://www.OpenBSD.org > > OpenBSD 6.1-current (RAMDISK_CD) #41: Tue May 2 21:13:30 MDT 2017 > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD > real mem = 1056964608 (1008MB) > avail mem = 1021235200 (973MB) > mainbus0 at root > bios0 at mainbus0 > acpi at bios0 not configured > cpu0 at mainbus0: (uniprocessor) > cpu0: Intel(R) Celeron(R) CPU G1610T @ 2.30GHz, 2295.33 MHz > cpu0: > FPU,VME,DE,PSE,MSR,PAE,MCE,CX8,SEP,PGE,MCA,CMOV,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,XSAVE,HV,NXE,LONG,LAHF,FSGSBASE,SMEP,ERMS > cpu0: 256KB 64b/line 8-way L2 cache > pvbus0 at mainbus0: OpenBSD > pci0 at mainbus0 bus 0 > pchb0 at pci0 dev 0 function 0 "OpenBSD VMM Host" rev 0x00 > virtio0 at pci0 dev 1 function 0 "Qumranet Virtio RNG" rev 0x00 > viornd0 at virtio0 > virtio0: irq 3 > virtio1 at pci0 dev 2 function 0 "Qumranet Virtio Storage" rev 0x00 > vioblk0 at virtio1 > scsibus0 at vioblk0: 2 targets > sd0 at scsibus0 targ 0 lun 0: SCSI3 0/direct > fixed > sd0: 4096MB, 512 bytes/sector, 8388608 sectors > virtio1: irq 5 > virtio2 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00 > vio0 at virtio2: address fe:e1:bb:d1:6d:23 > virtio2: irq 7 > virtio3 at pci0 dev 4 function 0 "OpenBSD VMM Control" rev 0x00 > virtio3: no matching child driver; not configured > isa0 at mainbus0 > com0 at isa0 port 0x3f8/8 irq 4: ns8250, no fifo > com0: console > softraid0 at root > scsibus1 at softraid0: 256 targets > root on rd0a swap on rd0b dump on rd0b > > erase ^?, werase ^W, kill ^U, intr ^C, status ^T > > Welcome to the OpenBSD/amd64 6.1 installation program. > (I)nstall, (U)pgrade, (A)utoinstall or (S)hell? I > At any prompt except password prompts you can escape to a shell by > typing '!'. Default answers are shown in []'s and are selected by > pressing RETURN. You can exit this program at any time by pressing > Control-C, but this can leave your system in an inconsistent state. > > Terminal type? [vt220] > System hostname? (short form, e.g. 'foo') vmtest > > Available network interfaces are: vio0 vlan0. > Which network interface do you wish to configure? (or 'done') [vio0] > IPv4 address for vio0? (or 'dhcp' or 'none') [dhcp] > DHCPDISCOVER on vio0 - interval 1 > DHCPDISCOVER on vio0 - interval 2 > DHCPDISCOVER on vio0 - interval 2 > DHCPDISCOVER on vio0 - interval 2 > DHCPDISCOVER on vio0 - interval 2 > DHCPDISCOVER on vio0 - interval 2 > No acceptable DHCPOFFERS received. > No working leases in persistent database - sleeping. > IPv6 address for vio0? (or
DHCP in vmm guest
Hi, I'm new to OpenBSD and I'm trying a simple setup where a VMM guest has access to the network via tap and bridge. The host uses a wired connection and gets its network address with DHCP. Here's my /etc/vm.conf: switch "vms_switch" { interface bridge0 add bge0 } vm "vm.test" { memory 1G boot /home/fstephany/bsd.rd disk /var/vms/fstephany/vmtest-disk.img owner fstephany interface tap { switch "vms_switch" } disable } I've stopped vmd with #rcctl stop vmd and started it manually: # vmd -dvv startup /etc/vm.conf:4: switch "vms_switch" registered /etc/vm.conf:15: vm "vm.test" registered (disabled) vm_priv_brconfig: interface bridge0 description switch1-vms_switch vm_priv_brconfig: interface bridge0 add bge0 vmd_configure: not creating vm vm.test (disabled) vm_opentty: vm vm.test tty /dev/ttyp1 uid 0 gid 4 mode 620 vm_priv_ifconfig: interface tap0 description vm1-if0-vm.test vm_priv_ifconfig: interface bridge0 add tap0 vm.test: started vm 1 successfully, tty /dev/ttyp1 loadfile_elf: loaded ELF kernel run_vm: initializing hardware for vm vm.test virtio_init: vm "vm.test" vio0 lladdr fe:e1:bb:d1:6d:23 run_vm: starting vcpu threads for vm vm.test vcpu_reset: resetting vcpu 0 for vm 5 run_vm: waiting on events for VM vm.test i8259_write_datareg: master pic, reset IRQ vector to 0x20 i8259_write_datareg: slave pic, reset IRQ vector to 0x28 vcpu_exit_i8253: channel 0 reset, mode=7, start=11932 virtio_blk_io: device reset virtio_net_io: device reset vionet queue notify - no space, dropping packet vionet queue notify - no space, dropping packet vionet queue notify - no space, dropping packet vionet queue notify - no space, dropping packet vionet queue notify - no space, dropping packet virtio_net_io: device reset Here's what happens when the installer tries to get a network address: # vmctl status ID PID VCPUS MAXMEM CURMEM TTYOWNER NAME 1 - 11.0G - -fstephany vm.test # vmctl start vm.test -c Connected to /dev/ttyp1 (speed 9600) Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2017 OpenBSD. All rights reserved. https://www.OpenBSD.org OpenBSD 6.1-current (RAMDISK_CD) #41: Tue May 2 21:13:30 MDT 2017 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD real mem = 1056964608 (1008MB) avail mem = 1021235200 (973MB) mainbus0 at root bios0 at mainbus0 acpi at bios0 not configured cpu0 at mainbus0: (uniprocessor) cpu0: Intel(R) Celeron(R) CPU G1610T @ 2.30GHz, 2295.33 MHz cpu0: FPU,VME,DE,PSE,MSR,PAE,MCE,CX8,SEP,PGE,MCA,CMOV,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,XSAVE,HV,NXE,LONG,LAHF,FSGSBASE,SMEP,ERMS cpu0: 256KB 64b/line 8-way L2 cache pvbus0 at mainbus0: OpenBSD pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "OpenBSD VMM Host" rev 0x00 virtio0 at pci0 dev 1 function 0 "Qumranet Virtio RNG" rev 0x00 viornd0 at virtio0 virtio0: irq 3 virtio1 at pci0 dev 2 function 0 "Qumranet Virtio Storage" rev 0x00 vioblk0 at virtio1 scsibus0 at vioblk0: 2 targets sd0 at scsibus0 targ 0 lun 0: SCSI3 0/direct fixed sd0: 4096MB, 512 bytes/sector, 8388608 sectors virtio1: irq 5 virtio2 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00 vio0 at virtio2: address fe:e1:bb:d1:6d:23 virtio2: irq 7 virtio3 at pci0 dev 4 function 0 "OpenBSD VMM Control" rev 0x00 virtio3: no matching child driver; not configured isa0 at mainbus0 com0 at isa0 port 0x3f8/8 irq 4: ns8250, no fifo com0: console softraid0 at root scsibus1 at softraid0: 256 targets root on rd0a swap on rd0b dump on rd0b erase ^?, werase ^W, kill ^U, intr ^C, status ^T Welcome to the OpenBSD/amd64 6.1 installation program. (I)nstall, (U)pgrade, (A)utoinstall or (S)hell? I At any prompt except password prompts you can escape to a shell by typing '!'. Default answers are shown in []'s and are selected by pressing RETURN. You can exit this program at any time by pressing Control-C, but this can leave your system in an inconsistent state. Terminal type? [vt220] System hostname? (short form, e.g. 'foo') vmtest Available network interfaces are: vio0 vlan0. Which network interface do you wish to configure? (or 'done') [vio0] IPv4 address for vio0? (or 'dhcp' or 'none') [dhcp] DHCPDISCOVER on vio0 - interval 1 DHCPDISCOVER on vio0 - interval 2 DHCPDISCOVER on vio0 - interval 2 DHCPDISCOVER on vio0 - interval 2 DHCPDISCOVER on vio0 - interval 2 DHCPDISCOVER on vio0 - interval 2 No acceptable DHCPOFFERS received. No working leases in persistent database - sleeping. IPv6 address for vio0? (or 'autoconf' or 'none') [none] Here's ifconfig when the VM is running. The bridge is there with bge0 and tap0: # ifconfig lo0: flags=8049 mtu 32768 index 4 priority 0 llprio 3 groups: lo inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 12