Re: [HOW-TO] CentOS on bhyve

2014-09-05 Thread Dan Mack

On Sat, 8 Mar 2014, Peter Grehan wrote:


Hi Rudy,


Peter, anyway to get grub-bhyve to automatically load /grub/grub.conf
from a CentOS install?


snip

CentOS is grub v1 which isn't quite compatible with grub2 (e.g. linux - 
kernel).


grub-bhyve can pick up a config file from the host system: use -r host to 
force that, and the -d option to change the default path for grub.conf. No 
need to redirect input.


Then, in grub.conf on the host, put in the absolute path with the grub 
commands e.g.


snip


(the console=ttyS0 isn't needed: grub-bhyve auto-inserts that).




Let me resucitate this thread ...

I just tried this on Centos7 and expeience the same lack of grub menu.
I was able to work around it by manually entering the manual paths for
linux and initrd but wouldn't it be nice ...

However, on the Centos7 install, there appears to be both a grub/ and
grub2/ configuration directory:

 |
 | grub ls (hd0,msdos1)/
 | Possible files are:
 |  grub/ grub2/ ...
 |

and in the grub2 folder there exists a seemling grub2 compatible grub.cfg file:

 | grub cat (hd0,msdos1)/grub2/grub.cfg
 | #
 | # DO NOT EDIT THIS FILE
 | #
 | # It is automatically generated by grub2-mkconfig using templates
 | # from /etc/grub.d and settings from /etc/default/grub
 | #
 | 
snip


Is there a way to direct grub-bhyve to use the
centos:/boot/grub2/grub.cfg file ala some argument -- I scanned the
source and couldn't find a simple over-ride.

I'll test/rebuild the suite if you can point me in the general
direction.

Thanks,

dan
--
Dan Mack

___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


Re: how is the MAC for tap(4) computed?

2013-11-04 Thread Dan Nelson
In the last episode (Nov 04), Aryeh Friedman said:
 There seems to be a very high rate of MAC address collisions when tap is
 running on different machines  is there anyway to make the selection
 of MAC more random

It looks like it's generated based on the number of ticks since boot, plus
the unit number of the tap device:

http://fxr.watson.org/fxr/source/net/if_tap.c#L434

So if you have devices created on boot on a bunch of machines, chances are
high that you'll get conflicts.  Maybe instead of using the 'ticks' value,
kern.hostid could be used instead?  That has much better randomness than
'ticks'.

-- 
Dan Nelson
dnel...@allantgroup.com
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


bhyve hangs on init on recent 10-CURRENT

2013-06-24 Thread Dan Mack
Is this just me?  When I start a new bhyve instance, it hangs on /sbin/init.   
top shows bhyve consuming about 1 host core of CPU.   This is on a real recent 
current.  



root@darkstor:/vms/porter # ./vmrun.sh porter
Launching virtual machine porter ...
Consoles: userboot  

FreeBSD/amd64 User boot, Revision 1.1
(r...@darkstor.macktronics.com, Sat Jun 22 22:31:58 CDT 2013)
Loading /boot/defaults/loader.conf 
/boot/kernel/kernel text=0x6c21c7 data=0xa43b8+0xfa338 
syms=[0x8+0xe76a8+0x8+0x147ee8]
\
  __      _ _  
 |  | |  _ \ / |  __ \ 
 | |___ _ __ ___  ___ | |_) | (___ | |  | |
 |  ___| '__/ _ \/ _ \|  _  \___ \| |  | |
 | |   | | |  __/  __/| |_) |) | |__| |
 | |   | | |||| |  |  |
 |_|   |_|  \___|\___||/|_/|_/````
 s` `.---...--.```   -/
 +Welcome to FreeBSD---+ +o   .--` /y:`  +.
 | |  yo`:.:o  `+-
 |  1. Back to Main Menu [Backspace]   |   y/   -/`   -o/
 |  2. Load System [D]efaults  |  .-  ::/sy+:.
 | |  / `--  /
 |  Boot Options:  | `:  :`
 |  3. Safe [M]ode... off  | `:  :`
 |  4. [S]ingle User. off  |  /  /
 |  5. [V]erbose. On   |  .--.
 | |   --  -.
 | |`:`  `:`
 | |  .-- `--.
 | | .---..
 +-+
  

Booting...
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
SMAP type=01 base= len=000a
SMAP type=01 base=0010 len=8930
Table 'APIC' at 0xf0500
APIC: Found table at 0xf0500
APIC: Using the MADT enumerator.
MADT: Found CPU APIC ID 0 ACPI ID 0: enabled
SMP: Added CPU 0 (AP)
MADT: Found CPU APIC ID 1 ACPI ID 1: enabled
SMP: Added CPU 1 (AP)
Copyright (c) 1992-2013 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.0-CURRENT #9 r251956: Tue Jun 18 12:25:25 CDT 2013
r...@darkstor.macktronics.com:/usr/obj/usr/src/sys/MACKGEN amd64
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Preloaded elf kernel /boot/kernel/kernel at 0x80e91000.
Hypervisor: Origin = BHyVBHyVBHyV
Calibrating TSC clock ... TSC clock: 3299774008 Hz
CPU: Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz (3299.77-MHz K8-class CPU)
  Origin = GenuineIntel  Id = 0x306a9  Family = 0x6  Model = 0x3a  Stepping = 
9
  
Features=0x8fa3ab7fFPU,VME,DE,PSE,TSC,MSR,PAE,CX8,APIC,SEP,PGE,CMOV,PAT,PSE36,DTS,MMX,FXSR,SSE,SSE2,SS,PBE
  
Features2=0xe3bae257SSE3,PCLMULQDQ,DTES64,DS_CPL,SMX,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,F16C,RDRAND,HV
  AMD Features=0x28100800SYSCALL,NX,RDTSCP,LM
  AMD Features2=0x1LAHF
  TSC: P-state invariant
real memory  = 2302672896 (2196 MB)
Physical memory chunk(s):
0x1000 - 0x0009bfff, 634880 bytes (155 pages)
0x0010 - 0x001f, 1048576 bytes (256 pages)
0x00eb1000 - 0x85bc1fff, 2228293632 bytes (544017 pages)
avail memory = 2133233664 (2034 MB)
Event timer LAPIC quality 400
ACPI APIC Table: BHYVE  BVMADT  
INTR: Adding local APIC 1 as a target
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 2 package(s) x 1 core(s)
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
x86bios:  IVT 0x00-0x0004ff at 0xfe00
x86bios: SSEG 0x001000-0x001fff at 0xff800022e000
x86bios:  ROM 0x0a-0x0fefff at 0xfe0a
APIC: CPU 0 has ACPI ID 0
APIC: CPU 1 has ACPI ID 1
random device not loaded; using insecure entropy
ULE: setup cpu 0
ULE: setup cpu 1
ACPI: RSDP 0xf0400 00024 (v02 BHYVE )
ACPI: XSDT 0xf0480 00034 (v01 BHYVE  BVXSDT   0001 INTL 20130517)
ACPI: APIC 0xf0500 00052 (v01 BHYVE  BVMADT   0001 INTL 20130517)
ACPI: FACP 0xf0600 0010C (v05 BHYVE  BVFACP   0001 INTL 20130517)
ACPI: DSDT 0xf0800 000F2 (v02 BHYVE  BVDSDT   0001 INTL 20130517)
ACPI: FACS 0xf0780 00040
MADT: Found IO APIC ID 2, Interrupt 0 at 0xfec0
ioapic0: Changing APIC ID to 2
ioapic0: Routing external 8259A's - intpin 0
MADT: Interrupt override: source 9, irq 9
ioapic0: intpin 9 trigger: level
ioapic0: intpin 9 polarity: low
ioapic0 Version 1.1 irqs 0-16 on motherboard
cpu0 BSP:
 ID: 0x   VER: 

bhyve: calcru runtime msgs still ocurring ...

2013-06-01 Thread Dan Mack
 0x2000-0x201f mem 
0xc000-0xc0001fff at device 1.0 on pci0
vtnet0: VirtIO Networking Adapter on virtio_pci0
virtio_pci0: host features: 0x1018020 NotifyOnEmpty,Status,MrgRxBuf,MacAddress
virtio_pci0: negotiated features: 0x1018020 
NotifyOnEmpty,Status,MrgRxBuf,MacAddress
vtnet0: Ethernet address: 00:a0:98:58:64:98
virtio_pci1: VirtIO PCI Network adapter port 0x2020-0x203f mem 
0xc0002000-0xc0003fff at device 2.0 on pci0
vtnet1: VirtIO Networking Adapter on virtio_pci1
virtio_pci1: host features: 0x1018020 NotifyOnEmpty,Status,MrgRxBuf,MacAddress
virtio_pci1: negotiated features: 0x1018020 
NotifyOnEmpty,Status,MrgRxBuf,MacAddress
vtnet1: Ethernet address: 00:a0:98:ec:d7:5d
virtio_pci2: VirtIO PCI Block adapter port 0x2040-0x207f mem 
0xc0004000-0xc0005fff at device 3.0 on pci0
vtblk0: VirtIO Block Adapter on virtio_pci2
virtio_pci2: host features: 0x1004 RingIndirect,MaxNumSegs
virtio_pci2: negotiated features: 0x1004 RingIndirect,MaxNumSegs
vtblk0: 24576MB (50331648 512 byte sectors)
uart2: 16550 or compatible port 0x3f8-0x3ff irq 4 at device 31.0 on pci0
uart2: console (9600,n,8,1)
ctl: CAM Target Layer loaded
Timecounters tick every 10.000 msec
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
SMP: AP CPU #1 Launched!
Trying to mount root from ufs:/dev/vtbd0p2 [rw]...
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
g_handleattr: vtbd0 bio_length 24 len 28 - EFAULT
calcru: runtime went backwards from 992 usec to 982 usec for pid 794 (sshd)
calcru: runtime went backwards from 702 usec to 695 usec for pid 800 (sendmail)

Thanks, hope this might help,

Dan

___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


Re: bhyve console question

2013-04-28 Thread Dan Mack

Ahh, cool.   I wasn't paying attention I guess:

 uart2: 16550 or compatible port 0x3f8-0x3ff irq 4 at device 31.0 on pci0
 uart2: console (9600,n,8,1)

which maps to the bhyve argument given:  '-S 31,uart,stdio'

and subsequently the serial console getty on ttyu2.  Nice.   Thank you,

It would be kind of cool to bind a guest's serial port to a named pipe on 
the host system (I think virtual box lets you do this too - an option when 
creating a guest serial port).


This would make it easy to have each bhyve guest with serial console 
attached to a list of device files upon which we could attach a screen 
session to later if we wanted to login or look at the console.


For now, I'll just spin up each vm guest within a separate screen window.

Take care,

Dan


On Sun, 28 Apr 2013, Peter Grehan wrote:


HI Dan,


Yes, the current bhyve-manual has that as a step in the configuration
(http://bhyve.org/bhyve-manual.txt) which I guess is the culprit. I
guess I just didn't expect that side effect but admit to not spending
much time thinking about it first :-)


I think it was done that way since /dev/console will always work, whereas 
the tty line to use changed at one point when we cut over from the ISA uart 
device to the PCI uart device resulting in a different tty device being used. 
However, it looks like we may switch back to using a PCI-ISA bridge device 
and that will change things again :(


For now, you can edit the stock /etc/ttys as follows:

-ttyu2  /usr/libexec/getty std.9600   dialup  off secure
+ttyu2   /usr/libexec/getty std.9600   vt100   on  secure

later,

Peter.


___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


bhyve console question

2013-04-27 Thread Dan Mack


For those of you tinkering with bhyve; quick question.  I've noticed that 
everything I type on the console ends up in /var/log/messages on the 
guest.  This includes all shell activity and login stuff.


Is this expected behaviour ?

When following the standard bhyve recipes on the interwebs, it appears as 
if all console activity is categorized as kernel.debug level messages, for 
example:


root@mcp:~ # tail /var/log/messages
Apr 27 15:50:02 mcp kernel: /
Apr 27 15:50:02 mcp kernel: va
Apr 27 15:50:03 mcp kernel: r/
Apr 27 15:50:03 mcp kernel: l
Apr 27 15:50:03 mcp kernel: o
Apr 27 15:50:03 mcp kernel: g
Apr 27 15:50:04 mcp kernel: /m
Apr 27 15:50:04 mcp kernel: e
Apr 27 15:50:04 mcp kernel: s
Apr 27 15:50:04 mcp kernel: sages

root@mcp:~ # echo 'weird, huh?'
weird, huh?
root@mcp:~ # !tail
tail /var/log/messages
Apr 27 15:50:25 mcp kernel: ,
Apr 27 15:50:25 mcp kernel: h
Apr 27 15:50:26 mcp kernel: u
Apr 27 15:50:26 mcp kernel: h
Apr 27 15:50:26 mcp kernel: ?
Apr 27 15:50:27 mcp kernel: '
Apr 27 15:50:27 mcp kernel:
Apr 27 15:50:29 mcp kernel: !
Apr 27 15:50:30 mcp kernel: ta
Apr 27 15:50:30 mcp kernel: il
root@mcp:~ #



___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


Re: bhyve tty / login problems / panic

2013-03-30 Thread Dan Mack
 ports with 2 removable, self powered
Root mount waiting for: usbus3 usbus1
ugen1.2: vendor 0x8087 at usbus1
uhub4: vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2 on 
usbus1

ugen3.2: vendor 0x8087 at usbus3
uhub5: vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2 on 
usbus3

Root mount waiting for: usbus3 usbus1
uhub4: 6 ports with 6 removable, self powered
uhub5: 8 ports with 8 removable, self powered
ugen1.3: vendor 0x060b at usbus1
ukbd0: vendor 0x060b USB Keyboard, class 0/0, rev 2.00/1.10, addr 3 on 
usbus1

kbd2 at ukbd0
ugen3.3: Ralink at usbus3
Root mount waiting for: usbus3
ugen3.4: vendor 0x0db0 at usbus3
Trying to mount root from zfs:tron []...
ums0: vendor 0x060b USB Keyboard, class 0/0, rev 2.00/1.10, addr 3 on 
usbus1

ums0: 5 buttons and [XYZ] coordinates ID=0
run0: 1.0 on usbus3
run0: MAC/BBP RT3070 (rev 0x0201), RF RT3020 (MIMO 1T1R), address 
94:db:c9:e3:6e:c8
ubt0: vendor 0x0db0 product 0xa871, class 224/1, rev 2.00/52.76, addr 4 
on usbus3

WARNING: attempt to domain_add(bluetooth) after domainfinalize()
WARNING: attempt to domain_add(netgraph) after domainfinalize()
tap0: Ethernet address: 00:bd:8c:54:07:00
tap0: link state changed to UP
bridge0: Ethernet address: 02:4c:89:ce:33:00
tap0: promiscuous mode enabled
bridge0: link state changed to UP
em1: link state changed to DOWN
em1: promiscuous mode enabled
em1: link state changed to UP
tap0: link state changed to DOWN
tap0: link state changed to UP
tap0: link state changed to DOWN
tap0: link state changed to UP





Yep, no problem.  I saw the checkin and started a rebuild a few minutes ago 
:-)


Thanks,

Dan

On Sat, 30 Mar 2013, Neel Natu wrote:


Hi Dan,

On Fri, Mar 29, 2013 at 3:20 PM, Dan Mack m...@macktronics.com wrote:




Here you go Neel:

root@olive:~ # bhyvectl --vm=coco --get-stats --cpu=0
vcpu0
vm exits due to external interrupt  45051
number of times hlt was intercepted 2277
number of NMIs delivered to vcpu0
vcpu total runtime  105001652482
number of ticks vcpu was idle   919
vcpu migration across host cpus 13
number of times hlt was ignored 0
total number of vm exits9240925
root@olive:~ #
root@olive:~ #
root@olive:~ # bhyvectl --vm=coco --get-stats --cpu=1
vcpu1
vm exits due to external interrupt  149431
number of times hlt was intercepted 4222
number of NMIs delivered to vcpu0
vcpu total runtime  106876622528
number of ticks vcpu was idle   869
vcpu migration across host cpus 20
number of times hlt was ignored 0
total number of vm exits8065909



That did not help a whole lot because we were not keeping track of all the
reasons a vcpu could exit.

I have fixed that in r248935:
http://svnweb.freebsd.org/base?view=revisionrevision=248935

Do you mind updating your vmm.ko with the change and getting the stats
again?

best
Neel



Dan



On Fri, 29 Mar 2013, Neel Natu wrote:

 Hi Dan,


On Fri, Mar 29, 2013 at 12:38 PM, Dan Mack m...@macktronics.com wrote:



I ran the procsystime dtrace script on bhyve when it was chewing up all
the CPU in vCPU=2 mode, and this is what I see for about 10s of runtime:

root@olive:/usr/share/dtrace/toolkit # ./procsystime -n bhyve -aT

Tracing... Hit Ctrl-C to end...
dtrace: 158536 dynamic variable drops with non-empty dirty list
dtrace: 207447 dynamic variable drops with non-empty dirty list
dtrace: 189205 dynamic variable drops with non-empty dirty list
dtrace: 164341 dynamic variable drops with non-empty dirty list
dtrace: 246307 dynamic variable drops with non-empty dirty list
dtrace: 187640 dynamic variable drops with non-empty dirty list
dtrace: 214771 dynamic variable drops with non-empty dirty list
dtrace: 221265 dynamic variable drops with non-empty dirty list
^C
dtrace: 243468 dynamic variable drops with non-empty dirty list

Elapsed Times for processes bhyve,

 SYSCALL  TIME (ns)
_umtx_op  18349
  writev 135712
  preadv   16175267
 pwritev   22924378
   ioctl 4353897920
  TOTAL: 4393151626

CPU Times for processes bhyve,

 SYSCALL  TIME (ns)
_umtx_op   8815
  writev 103145
 pwritev   10647023
  preadv   15159976
   ioctl 3943399889
  TOTAL: 3969318848

Syscall Counts for processes bhyve,

 SYSCALL  COUNT
_umtx_op 17
  writev 43
 pwritev639
  preadv   1183
   ioctl 652782
  TOTAL: 654664

Not sure if that helps or not.  Hotkernel shows the cpu in the
kernel`acpi_cpu_c1  call most of the time, normal ?

Dan

root@olive:/usr/share/dtrace/toolkit # ./hotkernel

Sampling... Hit Ctrl-C to end.
^C
FUNCTION

bhyve tty / login problems / panic

2013-03-28 Thread Dan Mack


I haven't spent too much time debugging this yet but I'd thought I'd ask 
just in case someone else has seen this:


 - fresh 10.x system (248804) , standard FreeBSD iso image I made with
   make release

 - latest vmrun.sh release.iso ...
 - install went okay, everything seemed normal

 - boot splash screen comes up fine, select default and do first boot

 - cannot login ... first few attempts result in 'login timed out 
messages' (but they get emitted as soon as I hit CR)


 - eventually I can get in after a few tries but then the shell 
immediately boots me after emitting the motd  :-)


 - and just leaving it sit results in panic

 - my kernel is mainly just GENERIC with the debugging yanked out and 
raid, scsi, and wifi devices.


Any ideas?


Below is the boot log and what I saw ...
Booting...
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2013 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.0-CURRENT #4 r248804: Wed Mar 27 19:29:38 CDT 2013
r...@olive.example.com:/usr/obj/usr/src/sys/MACKGEN amd64
FreeBSD clang version 3.2 (tags/RELEASE_32/final 170710) 20121221
CPU: Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz (3199.83-MHz K8-class CPU)
  Origin = GenuineIntel  Id = 0x206d7  Family = 0x6  Model = 0x2d 
Stepping = 7


Features=0x8fa3ab7fFPU,VME,DE,PSE,TSC,MSR,PAE,CX8,APIC,SEP,PGE,CMOV,PAT,PSE36,DTS,MMX,FXSR,SSE,SSE2,SS,PBE

Features2=0x83bee217SSE3,PCLMULQDQ,DTES64,DS_CPL,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,HV
  AMD Features=0x2c100800SYSCALL,NX,Page1GB,RDTSCP,LM
  AMD Features2=0x1LAHF
  TSC: P-state invariant
real memory  = 536870912 (512 MB)
avail memory = 482803712 (460 MB)
Event timer LAPIC quality 400
ACPI APIC Table: BHYVE  BVMADT  
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 2 package(s) x 1 core(s)
 cpu0 (BSP): APIC ID:  0
login: /amd64 (cocopuff.example.com) (console)ds.KLOCALic 0 mtu 
1500tation)3fff at device 2.0 on pci0i0


FreeBSD/amd64 (cocopuff.example.com) (console)

login: root
Login timed out after 300 seconds

FreeBSD/amd64 (cocopuff.example.com) (console)

login: root
Login timed out after 300 seconds

FreeBSD/amd64 (cocopuff.example.com) (console)

login: root
Login timed out after 300 seconds

FreeBSD/amd64 (cocopuff.example.com) (console)

login: root
Login timed out after 300 seconds

FreeBSD/amd64 (cocopuff.example.com) (console)

login: root
Password:
Jul 12 07:12:58 cocopuff login: ROOT LOGIN (root) ON console
FreeBSD 10.0-CURRENT (MACKGEN) #4 r248804: Wed Mar 27 19:29:38 CDT 2013

Welcome to FreeBSD!

Before seeking technical support, please use the following resources:

o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
   for your release first as it's updated frequently.

o  The Handbook and FAQ documents are at http://www.FreeBSD.org/ and,
   along with the mailing lists, can be searched by going to
   http://www.FreeBSD.org/search/.  If the doc package has been installed
   (or fetched via pkg install lang-freebsd-doc, where lang is the
   2-letter language code, e.g. en), they are also available formatted

If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questi...@freebsd.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.

Edit /etc/motd to change this login announcement.

You have new mail.
You have new mail.
root@cocopuff:~ # auto-logout

FreeBSD/amd64 (cocopuff.macktronics.com) (console)

login: panic: deadlkres: possible deadlock detected for 
0xfe001c919920, blocked for 303081 ticks


cpuid = 0
KDB: enter: panic
[ thread pid 0 tid 100027 ]
Stopped at  kdb_enter+0x3e: movq$0,kdb_why
db bt
Tracing pid 0 tid 100027 td 0xfe000358f490
kdb_enter() at kdb_enter+0x3e/frame 0xff80002bcae0
panic() at panic+0x176/frame 0xff80002bcb60
deadlkres() at deadlkres+0x488/frame 0xff80002bcbb0
fork_exit() at fork_exit+0x9a/frame 0xff80002bcbf0
fork_trampoline() at fork_trampoline+0xe/frame 0xff80002bcbf0
--- trap 0, rip = 0, rsp = 0xff80002bccb0, rbp = 0 ---


___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


Re: bhyve tty / login problems / panic

2013-03-28 Thread Dan Mack


Update#1:   I was using the default of 2 virtual CPUs.  When I switched to 
1 CPU via vmrun.sh, the system booted clean and let me login.


Also, when running with two vCPUs, the bhyve process is spinning at 100% 
even when the guest is doing nothing.


When running with one CPU, bhyve is mostly idle when the guest is idle.

Whatever was happening, it was impacting system time in a bad way as all 
of the log files were already getting rotated even though the system was 
less than 30 minutes old :-)


Let me know if there is anything I can do to help and if you have any 
ideas on a solution (other than only using uni-processor guests).


Thanks,

Dan

On Thu, 28 Mar 2013, Dan Mack wrote:



I haven't spent too much time debugging this yet but I'd thought I'd ask just 
in case someone else has seen this:


- fresh 10.x system (248804) , standard FreeBSD iso image I made with
  make release

- latest vmrun.sh release.iso ...
- install went okay, everything seemed normal

- boot splash screen comes up fine, select default and do first boot

- cannot login ... first few attempts result in 'login timed out messages' 
(but they get emitted as soon as I hit CR)


- eventually I can get in after a few tries but then the shell immediately 
boots me after emitting the motd  :-)


- and just leaving it sit results in panic

- my kernel is mainly just GENERIC with the debugging yanked out and raid, 
scsi, and wifi devices.


Any ideas?


Below is the boot log and what I saw ...
Booting...
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2013 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
   The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.0-CURRENT #4 r248804: Wed Mar 27 19:29:38 CDT 2013
   r...@olive.example.com:/usr/obj/usr/src/sys/MACKGEN amd64
FreeBSD clang version 3.2 (tags/RELEASE_32/final 170710) 20121221
CPU: Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz (3199.83-MHz K8-class CPU)
 Origin = GenuineIntel  Id = 0x206d7  Family = 0x6  Model = 0x2d Stepping 
= 7


Features=0x8fa3ab7fFPU,VME,DE,PSE,TSC,MSR,PAE,CX8,APIC,SEP,PGE,CMOV,PAT,PSE36,DTS,MMX,FXSR,SSE,SSE2,SS,PBE

Features2=0x83bee217SSE3,PCLMULQDQ,DTES64,DS_CPL,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,HV
 AMD Features=0x2c100800SYSCALL,NX,Page1GB,RDTSCP,LM
 AMD Features2=0x1LAHF
 TSC: P-state invariant
real memory  = 536870912 (512 MB)
avail memory = 482803712 (460 MB)
Event timer LAPIC quality 400
ACPI APIC Table: BHYVE  BVMADT  
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 2 package(s) x 1 core(s)
cpu0 (BSP): APIC ID:  0
login: /amd64 (cocopuff.example.com) (console)ds.KLOCALic 0 mtu 
1500tation)3fff at device 2.0 on pci0i0


FreeBSD/amd64 (cocopuff.example.com) (console)

login: root
Login timed out after 300 seconds

FreeBSD/amd64 (cocopuff.example.com) (console)

login: root
Login timed out after 300 seconds

FreeBSD/amd64 (cocopuff.example.com) (console)

login: root
Login timed out after 300 seconds

FreeBSD/amd64 (cocopuff.example.com) (console)

login: root
Login timed out after 300 seconds

FreeBSD/amd64 (cocopuff.example.com) (console)

login: root
Password:
Jul 12 07:12:58 cocopuff login: ROOT LOGIN (root) ON console
FreeBSD 10.0-CURRENT (MACKGEN) #4 r248804: Wed Mar 27 19:29:38 CDT 2013

Welcome to FreeBSD!

Before seeking technical support, please use the following resources:

o  Security advisories and updated errata information for all releases are
  at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
  for your release first as it's updated frequently.

o  The Handbook and FAQ documents are at http://www.FreeBSD.org/ and,
  along with the mailing lists, can be searched by going to
  http://www.FreeBSD.org/search/.  If the doc package has been installed
  (or fetched via pkg install lang-freebsd-doc, where lang is the
  2-letter language code, e.g. en), they are also available formatted

If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questi...@freebsd.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.

Edit /etc/motd to change this login announcement.

You have new mail.
You have new mail.
root@cocopuff:~ # auto-logout

FreeBSD/amd64 (cocopuff.macktronics.com) (console)

login: panic: deadlkres: possible deadlock detected for 0xfe001c919920, 
blocked for 303081 ticks


cpuid = 0
KDB: enter: panic
[ thread pid 0 tid 100027 ]
Stopped at  kdb_enter+0x3e: movq$0,kdb_why
db bt
Tracing pid 0 tid 100027 td 0xfe000358f490
kdb_enter() at kdb_enter+0x3e/frame 0xff80002bcae0
panic() at panic+0x176/frame 0xff80002bcb60
deadlkres() at deadlkres+0x488

Re: [PATCH] virtualbox-ose - VBoxHeadless TCPv6 port value

2012-06-22 Thread Dan Mack

On Thu, 21 Jun 2012, Maurizio Vairani wrote:


On 21/06/2012 0.39, Dan Mack wrote:


I think this patch is broken.  I get :

/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.16/src/VBox/Frontends/VBoxHeadless/FramebufferVNC.cpp:94: 
  error: 'struct _rfbScreenInfo' has no member named 'ipv6port'
kmk: *** 
[/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.16/out/freebsd.amd64/release/obj/VBoxHeadless/FramebufferVNC.o] 
Error 1


Dan

On Thu, 17 May 2012, Maurizio Vairani wrote:


Dear list members,
the latest libvncserver has IPv6 enabled by default. VirtualBox uses this 
library for VNC headless connection without specify the tcp6 port value. 
Running two or more virtual machines, all are trying to use the same tpc6 
port 5900, the default value.  Connecting with a VNC viewer to a virtual 
machine, different from the first started,  it crashes with a core dump, 
probably due a bug in the FreeBSD libvncserver implementation.
This simple patch set the tcp6 port value to the same value as tcp4 port 
avoiding the crash.


Regards,
Maurizio




What version of libvncserver you have ?
I have installed v. 0.9.9_2
$ pkg_info | grep libvnc
libvncserver-0.9.9_2 Provide an easy API to write one's own vnc server

Maurizio



Ack, my bad.   I still have version 0.9.8 installed; I'll re-build with 
0.9.9 after 4.1.18 is released.


Dan
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


Re: [PATCH] virtualbox-ose - VBoxHeadless TCPv6 port value

2012-06-20 Thread Dan Mack


I think this patch is broken.  I get :

/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.16/src/VBox/Frontends/VBoxHeadless/FramebufferVNC.cpp:94:
  error: 'struct _rfbScreenInfo' has no member named 'ipv6port'
kmk: *** [/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.16/out/freebsd.amd64/release/obj/VBoxHeadless/FramebufferVNC.o] 
Error 1


Dan

On Thu, 17 May 2012, Maurizio Vairani wrote:


Dear list members,
the latest libvncserver has IPv6 enabled by default. VirtualBox uses this 
library for VNC headless connection without specify the tcp6 port value. 
Running two or more virtual machines, all are trying to use the same tpc6 
port 5900, the default value.  Connecting with a VNC viewer to a virtual 
machine, different from the first started,  it crashes with a core dump, 
probably due a bug in the FreeBSD libvncserver implementation.
This simple patch set the tcp6 port value to the same value as tcp4 port 
avoiding the crash.


Regards,
Maurizio




___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


Re: VIMAGE: Freed UMA keg was not empty

2010-11-18 Thread Dan
Brandon Gooch jamesbrandongo...@... writes:

 
 On Wed, Nov 17, 2010 at 7:17 AM, Bjoern A. Zeeb
 bzeeb-li...@... wrote:
  On Wed, 17 Nov 2010, Marko Zec wrote:
 
  Actually, we never seriously discussed or revisited the issue with
  separate
  UMA pools for each vnet instance.
 
  My original motivation when O introduced separate UMA pools was primarily
  in
  making it easier to spot resource leaks, and to prove the correctness of
  the
  whole VIMAGE / VNET thing.  Having more or less achieved those goals,
  perhaps
  the time has come to move on.  Having said that, and given that the
  current
  VIMAGE resource allocation model is far from being optimal (a lot of
  memory
  sits reserved but 99% unused, and cannot be reclaimed later on vnet
  teardown), perhaps it's time that we reconsider using unified UMA pools.
 
  I think there is a misunderstanding here;  it can be 
reclaimed by the
  time we have the teardown properly sorted out and 
it will immediately
  help normal non-VIMAGE systems under memory 
pressure as well.
  The problem is that, at least for TCP (and UDP in one special case as
  I found after lots of testing), we are no there yet.
 
  After that, when it comes to resource usage, I am still wondering how
  trasz' resource limits will plug into that.  By the time we can see
  those coming together we should be able to decide whether to go left
  or right.
 
 
 I've been running into this memory exhaustion as well, having a need
 to stop and start my VIMAGE jails frequently.
 
 I'm confident that the proper solution will be worked out, but I
 wonder what sort of time-frame we may be looking at -- is VIMAGE
 expected to be production by 9.0-RELEASE? Also, does anyone know the
 current status of trasz's work (which I believe is to be completed
 December of this year)? I hope it's still on schedule :)
 
 -Brandon
 


Hey there,

I have been experiencing a similar problem.  I am running 
Freebsd8.1 64bit Release and after closing 
my server application I come across 

this type of message
Freed UMA keg was not empty (672 items).  Lost 4 pages of 
memory

The more virtual nodes I use the more of these message I have.  
Someone told me this does not mean 
anything but after reading this it seems I should be worried.  
It does show up in my log files as well.
I wonder if running a fsck will resolve any issues after I 
have this problem?  Hopefully we can find a 
solution because I rely on my application heavily.  

Thanks,

Dan



___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org