Re: vmd: upper limit on number of vm's?

2017-02-09 Thread Eric Brown
Gregor Best  writes:

> Hi,
>
>> [...]
>> # tail -4 /var/log/messages
>> Feb  9 11:21:44 air vmd[73442]: parent terminating
>> Feb 9 11:21:47 air vmd[73405]: config_setvm: can't open tap tap: No
>> such file or directory
>> [...]
>
> You're probably missing the device files for the taps in /dev. The
> installer creates 4 by default, so you'll have to run
>
>   cd /dev; sh MAKEDEV tap4
>
> and so on for each new tap device you need.

Worked like a charm.  So awesome.

Thank you!



Re: vmd: upper limit on number of vm's?

2017-02-09 Thread Eric Brown
Gregor Best <g...@unobtanium.de> writes:

> Hi,
>
> On Thu, Feb 09, 2017 at 11:33:19AM -0600, Eric Brown wrote:
>> [...]
>> # tail -4 /var/log/messages
>> Feb  9 11:21:44 air vmd[73442]: parent terminating
>> Feb  9 11:21:47 air vmd[73405]: config_setvm: can't open tap tap: No such 
>> file or directory
>> [...]
>
> You're probably missing the device files for the taps in /dev. The
> installer creates 4 by default, so you'll have to run
>
>   cd /dev; sh MAKEDEV tap4
>
> and so on for each new tap device you need.

Worked like a charm.  So awesome.

Thank you!



Re: vmd: keeping time in vm's

2017-02-09 Thread Eric Brown
Eric Brown <br...@fastmail.com> writes:

> Dear List,
>
> I've recently learned (and discovered) that time in VM's is tricky
> business.  I'm looking for the least stupid way to keep any semblance of
> time in vmd instances while I hungrily await a "correct solution" to
> descend from the heavens.
>
> I've disabled openntpd, installed ntp package (but not its daemon). Now
> I am running ntpdate every minute from cron.  It seems to keep the
> clock, well, within a minute.
>
> Can anyone think of a better solution to this problem?
>
> Thanks,
> Eric

It was suggested that dmesg for the host and guest might be helpful.
Please find them below:

-- host dmesg --
OpenBSD 6.0-current (GENERIC.MP) #163: Sun Feb  5 13:55:12 MST 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
RTC BIOS diagnostic error 7
real mem = 8475713536 (8083MB)
avail mem = 8214179840 (7833MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe (54 entries)
bios0: vendor Apple Inc. version "MBA51.88Z.00EF.B05.1610241034" date 10/24/2016
bios0: Apple Inc. MacBookAir5,1
acpi0 at bios0: rev 2
acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP HPET APIC SBST ECDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT 
SSDT SSDT SSDT DMAR MCFG
acpi0: wakeup devices P0P2(S4) PEG2(S4) EC__(S4) HDEF(S4) RP02(S4) ARPT(S4) 
RP05(S4) EHC1(S4) EHC2(S4) XHC1(S4) ADP1(S4) LID0(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz, 2494.75 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 2494745050 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz, 2494.34 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz, 2494.34 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz, 2494.34 MHz
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpiec0 at acpi0
acpimcfg0 at acpi0 addr 0xe000, bus 0-153
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P2)
acpiprt2 at acpi0: bus -1 (PEG2)
acpiprt3 at acpi0: bus 2 (RP02)
acpiprt4 at acpi0: bus 3 (RP05)
acpicpu0 at acpi0: C3(200@198 mwait.1@0x30), C2(500@148 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@198 mwait.1@0x30), C2(500@148 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@198 mwait.1@0x30), C2(500@148 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@198 mwait.1@0x30), C2(500@148 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
"APP0001" at acpi0 not configured
acpials0 at acpi0: ALS0
"ACPI0002" at acpi0 not configured
acpibat0 at acpi0: BAT0 model "7301496308839493953" type 7301496309193591116 
oem "7301496571575100750"
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
"APP0002" at acpi0 not configured
acpibtn2 at acpi0: SLPB
acpivideo0 at acpi0: IGPU
acpivout0 at acpivideo0: DD02
cpu0: Enhanced SpeedStep 2494 MHz: speeds: 2001, 2000, 1900, 1800, 1700, 1600, 
1500, 1400, 1300, 1200, 1100, 1000

vmd: keeping time in vm's

2017-02-09 Thread Eric Brown
Dear List,

I've recently learned (and discovered) that time in VM's is tricky
business.  I'm looking for the least stupid way to keep any semblance of
time in vmd instances while I hungrily await a "correct solution" to
descend from the heavens.

I've disabled openntpd, installed ntp package (but not its daemon). Now
I am running ntpdate every minute from cron.  It seems to keep the
clock, well, within a minute.

Can anyone think of a better solution to this problem?

Thanks,
Eric



vmd: upper limit on number of vm's?

2017-02-09 Thread Eric Brown
Dear List,

I am experimenting with virtual machines (vmd) in recent OpenBSD
snapshots.  Having gotten a few VMs working, I am eager to make many
more and also run them. I'm pleased to have an autoinstall process
running from a vmd instance.

However, when running more than 4 instances, I run into an error:

# /etc/rc.d/vmd stop
# ... /etc/vm.conf  enable a fifth machine that is confirmed to run
# /etc/rc.d/vmd start

# vmctl status
vmctl: connect: /var/run/vmd.sock: Connection refused

# tail -4 /var/log/messages
Feb  9 11:21:44 air vmd[73442]: parent terminating
Feb  9 11:21:47 air vmd[73405]: config_setvm: can't open tap tap: No such file 
or directory
Feb  9 11:21:47 air vmd[73405]: config_setvm: failed to start vm 
mirror.ericcbrown.com
Feb  9 11:21:47 air vmd[73405]: parent: configuration failed

Some evidence that may help:
* I can make a bunch of tap's with ifconfig, many more than4. 
  (hostname.bridge0,hostname.bge0,and hostname.vether configured)
* I am using i7 2.0 Ghz with 2 cores and 4 hyperthreads that appear in
`top' (macbook air 2011)
* I confirm that each machine works in any combination of 4 vm's concurrently

I've tried to read the source, but I'm totally stuck here, and thought I
would ask whether anyone knows what could be the stopper here at running
many vm's.

Best regards,
Eric

PS Thank you very much to Mike Larkin and Reyk Floeter for authoring this.
It has been a very nice way to explore network and routing concepts
while making VM's that do very useful things for me.

-- dmesg of host machine --
OpenBSD 6.0-current (GENERIC.MP) #163: Sun Feb  5 13:55:12 MST 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
RTC BIOS diagnostic error 
f7
real mem = 1836232704 (1751MB)
avail mem = 1775980544 (1693MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe (39 entries)
bios0: vendor Apple Inc. version "MB61.88Z.00C8.B00.0908271503" date 08/27/09
bios0: Apple Inc. MacBook6,1
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC APIC MCFG ASF! SBST ECDT SSDT SSDT SSDT SSDT
acpi0: wakeup devices ADP1(S3) LID0(S3) EC__(S3) OHC1(S3) EHC1(S3) OHC2(S3) 
EHC2(S3) GIGE(S5) ARPT(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 2500 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU P7550 @ 2.26GHz, 2255.72 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 265MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2.1.3, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU P7550 @ 2.26GHz, 2255.35 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR
cpu1: 3MB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 11, 24 pins
acpimcfg0 at acpi0 addr 0xf000, bus 0-255
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (IXVE)
acpicpu0 at acpi0: !C3(100@57 mwait.3@0x31), !C2(500@1 mwait@0x10), C1(1000@1 
mwait), PSS
acpicpu1 at acpi0: !C3(100@57 mwait.3@0x31), !C2(500@1 mwait@0x10), C1(1000@1 
mwait), PSS
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID0
"APP0002" at acpi0 not configured
acpibtn1 at acpi0: PWRB
acpibtn2 at acpi0: SLPB
"APP0001" at acpi0 not configured
"APP0003" at acpi0 not configured
"ACPI0002" at acpi0 not configured
acpibat0 at acpi0: BAT0 model "3545797981023400290" type 3545797981528607052 
oem "3545797981528608836"
cpu0: Enhanced SpeedStep 2255 MHz: speeds: 2261, 2128, 1862, 1596, 798 MHz
memory map conflict 0xffc0/0x40
pci0 at mainbus0 bus 0
0:3:5: mem address conflict 0x9330/0x8
pchb0 at pci0 dev 0 function 0 "NVIDIA MCP79 Host" rev 0xb1
"NVIDIA MCP79 Memory" rev 0xb1 at pci0 dev 0 function 1 not configured
pcib0 at pci0 dev 3 function 0 "NVIDIA MCP79 ISA" rev 0xb3
"NVIDIA MCP79 Memory" rev 0xb1 at pci0 dev 3 function 1 not configured
nviic0 at pci0 dev 3 function 2 "NVIDIA MCP79 SMBus" rev 0xb1
iic0 at nviic0
spdmem0 at iic0 addr 0x50: 2GB DDR3 SDRAM PC3-8500 SO-DIMM
iic1 at nviic0
iic1: addr 0x4c 00=47 01=5a 02=92 04=07 05=55 07=55 0a=07 0b=55 0d=55 10=e0 
15=55 19=55 1a=55 20=55 21=0a 22=70 23=43 24=60 25=0b 26=0f 27=12 28=12 29=a0 
35=02 37=02 60=06 70=06 71=03 72=07 8c=ff 8d=ff 8e=ff 8f=ff 90=ff 9a=ff 9b=ff 
9c=ff 9d=ff 9e=ff 9f=ff a0=ff a1=ff a2=ff a3=ff a4=ff a5=ff a6=ff 

Re: Setting MAC address of vm in vm.conf with lladdr

2016-12-05 Thread Eric Brown
Reyk Floeter  writes:

> I cannot reproduce it, it works as intended.  Are you sure that you
> were looking at the MAC address on the "VM guest side" and not on the
> host side, as mentioned in vm.conf(5):
>
>  lladdr etheraddr
>  Change the link layer address (MAC address) of the
>  interface on the VM guest side.  If not specified, a
>  randomized address will be assigned by vmd(8).
>
> Can you try with current and run vmd in foreground "vmd -dvv", I added
> a debug message that will show more details:
>
> run_vm: initializing hardware for vm openbsd.vm
> virtio_init: vm "openbsd.vm" vio0 lladdr 00:01:ba:d0:e8:db
> virtio_init: vm "openbsd.vm" vio1 lladdr fe:e1:bb:d2:bc:72
> run_vm: starting vcpu threads for vm openbsd.vm
>
> As you see, my test cases uses a fixed lladdr for the first interface;
> ifconfig within the guest show the same.
>
> Reyk
>

Hi Reyk,

Thank you for your response.  I think you have identified my
misunderstanding of the lladdr setting, which sets the vio0 address on
the inside of the VM just fine.

My interest in this setting is to assign an IP address from a DHCP
server based on MAC address, so that I can e.g. ssh and/or http into
this VM.

I am gathering that this should be done on the host side?

Eric



Setting MAC address of vm in vm.conf with lladdr

2016-12-04 Thread Eric Brown
Dear List,

I am using the current snapshot (Dec 3 as of this post), and I am trying
to set the MAC address of a vm host in vm.conf.

However, the MAC address reported by ifconfig -a seems to change with
each restart. The lladdr that I had typed in was from a copy/paste of a
random assignment, so I hope that it is valid.

I know that this is still a WIP, but I thought I would ask in case I'm
making a dumb mistake.

Thanks, 
Eric


-
/etc/vm.conf:

vm "current.ericcbrown.com" {
  memory 2048M
  kernel "/root/vmm/current/bsd"
  disk "/var/vmm/current/disk.img"
  interface tap {
lladdr fe:e1:ba:d1:77:24
switch uplink
  } 
}

switch uplink {
  add bge0
}



Re: Software for time management calendar

2015-03-22 Thread Eric Brown
Lampshade lampsh...@poczta.fm writes:

 What software you use for this purposes?

I use GNU Emacs with org-mode.  Emacs is included in OpenBSD packages.



Re: OpenBSD packages extremely outdated?

2014-02-09 Thread Eric Brown
openda...@hushmail.com writes:

 Hello,

 Are OpenBSD's packages extremely outdated? What would you say to this
 guy?

 At least with Linux I don't have to wait 6 hours for all my software
 to finish compiling. Think about all the trees that are unnecessarily
 cut down because of all that compiling. [...snip...] OpenBSD only has
 a small number of precompiled packages, and usually extremely
 outdated. If you want to get anything useful you have to compile
 ports.

  https://news.ycombinator.com/item?id=7196494

 Thanks!

 O.D.

Almost all of the software on my system (all from packages, except
kernel/userland/xenocara) is current. There may be some packages that
lag behind, but I really don't notice. In fact, the up-to-date
applications is one of the reasons that I adopted OpenBSD.

If you truly need cutting edge *right now* and it's not in precompiled
packages, then there is a current foundation of supporting packages so
that you can compile your own version if necessary.

I enjoy building an occasional port from time to time, because it
reassures me (in warm-fuzzy, freedom loving way) that indeed it is
possible to compile from source code.



Re: new to OpenBSD and have a few questions

2014-02-09 Thread Eric Brown
I heartily recommend Absolute OpenBSD, 2nd Edition.

The answers to (almost) all of your questions, and others that are bound
to come up, can be found there.  It's written at a nice intermediate
level.

Also, is it necessary to partition your disk into smaller pieces? I
mean, I can understand why this could be important. But in my
experience, I have had many more issues with small partitions than one
great big /.  Usually by way of tinkering with sizes to be big enough,
but not too big.  It seems to be never ending agonizing unless the
workload is known fairly precisely.

Yes, you would need a (C)ustom:

z   (- erase table)
a
b   (- add a swap if you want, customarily 2 * ram of system)
(accept offset)
(enter size, e.g. `8G' )
a
a   (- remainder for /)
(accept offset)
(accept size)
(accept default format)
( mount at `/'  )

w
q

and move on to better things in life. (You can back up to another volume
with rsync, too!)

Best regards,
Eric



Re: new to OpenBSD and have a few questions

2014-02-09 Thread Eric Brown
Philip Guenther guent...@gmail.com writes:

 Certainly I will need to create a mount point for a /opt filesystem ...

 I'm not sure why you would want a /opt filesystem.  In OpenBSD, ports
 and packages install under /usr/local/
 I suggest trying those and, in general, getting used to how OpenBSD
 lays stuff out before you add more partitions.

/opt is commonly used to install packages/programs from source.  It's
nice to put programs like:

/opt/emacs-24.3.50  (- a development version)
/opt/R-2.11.1   (- a hoary version)
/opt/R-3.0.2(- a newer version than pkg, but generally same file names)

Then, one can obliterate the directory and not have to pick through
/usr/local.

But, I don't see why it needs to be on its own partition, other than /