Current problem reports assigned to freebsd-virtualization@FreeBSD.org

2013-06-24 Thread FreeBSD bugmaster
Note: to view an individual PR, use:
  http://www.freebsd.org/cgi/query-pr.cgi?pr=(number).

The following is a listing of current problems submitted by FreeBSD users.
These represent problem reports covering all versions including
experimental development code and obsolete releases.


S Tracker  Resp.  Description

o kern/170096  virtualization[vimage] Dynamically-attached network interface 
will c
o kern/169991  virtualization[run] [vimage] panic after device plugged in
o kern/165252  virtualization[vimage] [pf] [panic] kernel panics with VIMAGE 
and PF
o kern/161094  virtualization[vimage] [pf] [panic] kernel panic with pf + 
VIMAGE wh
o kern/160541  virtualization[vimage][pf][patch] panic: userret: Returning on 
td 0x
o kern/160496  virtualization[vimage] [pf] [patch] kernel panic with pf + VIMAGE
o kern/148155  virtualization[vimage] [pf] Kernel panic with PF + VIMAGE kernel 
opt
a kern/147950  virtualization[vimage] [carp] VIMAGE + CARP = kernel crash
s kern/143808  virtualization[pf] pf does not work inside jail
a kern/141696  virtualization[rum] [vimage] [panic] rum(4)+ vimage = kernel 
panic

10 problems total.

___
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: 

recursive bhyve

2013-06-24 Thread Aryeh Friedman
Is it possible to run bhyve on a guest that was started from bhyve?
___
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: headerless guest under bhyve

2013-06-24 Thread Neel Natu
Hi Aryeh,

On Mon, Jun 24, 2013 at 3:54 PM, Aryeh Friedman aryeh.fried...@gmail.comwrote:

 How do I make it so I do not need to allocate a xterm to being the
 console for a bhyve guest? (so far I have not been able to make it so
 I can break the connection to the console and the guest doesn't crash)


Yeah, this is because bhyve is exiting when it gets a SIGHUP.

Here is a patch that may help you sidestep this problem for now:

Index: bhyverun.c
===
--- bhyverun.c (revision 252047)
+++ bhyverun.c (working copy)
@@ -679,6 +679,17 @@

  vmname = argv[0];

+ {
+ struct sigaction sa;
+
+ sigemptyset(sa.sa_mask);
+ sa.sa_flags = 0;
+ sa.sa_handler = SIG_IGN;
+
+ err = sigaction(SIGHUP, sa, NULL);
+ assert(err == 0);
+ }
+

The right way to fix this is to have a configurable backend (terminal,
network port, pipe) for the virtual serial port.


 Related question when using vmrun.sh it seems like the vtnet on the
 guest becomes unusable after reboot of the guest (rebooting the host
 is the only solution I can find) is there a work around for this? (I
 tried toggling the state of if_tap and if_bridge)


If you could provide some more details I will try to reproduce it. For e.g.
IP address assigned to the guest, host networking setup etc.

best
Neel


 ___
 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

___
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 guest dies on building java/openjdk6

2013-06-24 Thread Aryeh Friedman
As soon as java/openjdk6 starts its build process (fdesc and procfs
both are present as per pkg-message) bhyve dies with:

vm exit[0]
reason  VMX
rip 0x0008032322ac

inst_length 2

error   0

exit_reason 10
qualification   0x
___
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 guest dies on building java/openjdk6

2013-06-24 Thread Neel Natu
Hi Aryeh,

On Mon, Jun 24, 2013 at 4:25 PM, Aryeh Friedman
aryeh.fried...@gmail.com wrote:

 As soon as java/openjdk6 starts its build process (fdesc and procfs
 both are present as per pkg-message) bhyve dies with:

 vm exit[0]
 reason  VMX
 rip 0x0008032322ac

 inst_length 2

 error   0

 exit_reason 10


Thanks for reporting this. The exit reason indicates bhyve is not
happy with the cpuid leaf that the guest is querying.

Tycho Nightingale has a patch to the cpuid emulation that should fix
the issue you are seeing.

Could you give it a spin?

Index: x86.c
===
--- x86.c   (revision 251672)
+++ x86.c   (working copy)
@@ -45,7 +45,7 @@

 #defineCPUID_VM_HIGH   0x4000

-static const char bhyve_id[12] = BHyVE BHyVE ;
+static const char bhyve_id[12] = bhyve bhyve ;

 int
 x86_emulate_cpuid(struct vm *vm, int vcpu_id,
@@ -80,12 +80,10 @@
case CPUID__:
case CPUID__0002:
case CPUID__0003:
-   case CPUID__000A:
cpuid_count(*eax, *ecx, regs);
break;

case CPUID_8000_:
-   case CPUID_8000_0001:
case CPUID_8000_0002:
case CPUID_8000_0003:
case CPUID_8000_0004:
@@ -94,6 +92,15 @@
cpuid_count(*eax, *ecx, regs);
break;

+   case CPUID_8000_0001:
+   /*
+* Hide rdtscp/ia32_tsc_aux until we know how
+* to deal with them.
+*/
+   cpuid_count(*eax, *ecx, regs);
+   regs[3] = ~AMDID_RDTSCP;
+   break;
+
case CPUID_8000_0007:
cpuid_count(*eax, *ecx, regs);
/*
@@ -151,6 +158,11 @@
regs[2] = ~CPUID2_MON;

/*
+* Hide the performance and debug features.
+*/
+   regs[2] = ~CPUID2_PDCM;
+
+   /*
 * Hide thermal monitoring
 */
regs[3] = ~(CPUID_ACPI | CPUID_TM);
@@ -161,6 +173,11 @@
 */
regs[3] = ~(CPUID_MCA | CPUID_MCE | CPUID_MTRR);

+/*
+* Hide the debug store capability.
+*/
+   regs[3] = ~CPUID_DS;
+
/*
 * Disable multi-core.
 */
@@ -180,6 +197,7 @@

case CPUID__0006:
case CPUID__0007:
+   case CPUID__000A:
/*
 * Handle the access, but report 0 for
 * all options
@@ -203,12 +221,17 @@
case 0x4000:
regs[0] = CPUID_VM_HIGH;
bcopy(bhyve_id, regs[1], 4);
-   bcopy(bhyve_id, regs[2], 4);
-   bcopy(bhyve_id, regs[3], 4);
+   bcopy(bhyve_id + 4, regs[2], 4);
+   bcopy(bhyve_id + 8, regs[3], 4);
break;
+
default:
-   /* XXX: Leaf 5? */
-   return (0);
+   /*
+* The leaf value has already been clamped, so
+* simply pass this through
+*/
+   cpuid_count(*eax, *ecx, regs);
+   break;
}

*eax = regs[0];

best
Neel

 qualification   0x
 ___
 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
___
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: installing 9.1-RELEASE guest on byhve

2013-06-24 Thread Michael Dexter


My mistake: 9-STABLE which is 9* (incl. 9.1) with VirtIO drivers.

You can relatively easily backport VirtIO drivers to 9.1 if you really 
need 9.1


Yep. Linux and Windows support will be great and at least one is has 
been demonstrated.


Michael

On 6/23/13 5:34 PM, Aryeh Friedman wrote:

This is a critical deficiency I need to be able to install *ANY* OS
for what I have in mind.  Note I do have 10-CURRENT up as a guest.
I am attempting to use bhyve as the foundation of a cross platform
testing lab and thus needs to support FB (8,9 and 10), Linux (Ubuntu
12.04 LTS at a min) and Windows.  Also it is 9.1 not 9-RELEASE (I
thought 9.1 was 9-RELEASE)

On Sun, Jun 23, 2013 at 8:22 PM, Michael Dexter
edi...@callfortesting.org wrote:

On 6/23/13 4:52 PM, Aryeh Friedman wrote:


I have byhve up and running on a 10-CURRENT machine and want to know
the best way to install from CD 9.1 on it.  Any references I should
look at?



You will need to install 9-CURRENT as 9.1 did not ship with VirtIO drivers.
May I suggest: http://bhyve.org for information and installation scripts.

Michael



___
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 hangs on init on recent 10-CURRENT

2013-06-24 Thread Neel Natu
Hi Dan,

On Sun, Jun 23, 2013 at 7:02 AM, Dan Mack m...@macktronics.com wrote:
 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.


I don't see it on my system with this:
FreeBSD 10.0-CURRENT (GENERIC) #0: Sun Jun 23 02:55:37 UTC 2013

My system has a much lower clock speed that yours - 2GHz versus
3.2GHz, but other than that I kept everything else similar to your
setup.

Is this a new system or were you able to use this successfully in the
past to run bhyve?

best
Neel



 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