FreeBSD 7.0, VMWare ESXi & iSCSI
Johan Ström
johan at stromnet.se
Thu Oct 9 12:13:55 UTC 2008
Hi
I'm playing around with FreeBSD 7.0 inside a VMWare ESXi virtual
machine. The machine have a iSCSI drive mounted (Raw Device Mapping,
physical access) in ESXi, so it should appear as a regular SCSI disk
for the guest OS (FreeBSD).
However, I'm having problems using it. It isnt detected on boot, and
if I run camcontrol rescan all it seems to be found but is immediately
detached, and then the kernel panics:
esxi-g1# kgdb /boot/kernel/kernel vmcore.0
[GDB will not be able to debug user-mode threads: /usr/lib/
libthread_db.so: Undefined symbol "ps_pglobal_lookup"]
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-marcel-freebsd".
Unread portion of the kernel message buffer:
da1 at mpt1 bus 0 target 0 lun 0
da1: <Openfile Virtual disk 0> Fixed Direct Access SCSI-4 device
da1: 6.600MB/s transfers (16bit)
da1: Command Queueing Enabled
da1: 10432MB (21364736 512 byte sectors: 255H 63S/T 1329C)
(da1:mpt1:0:0:0): lost device
(da1:mpt1:0:0:0): removing device entry
(xpt0:nobus:X:X): removing device entry
kernel trap 12 with interrupts disabled
Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address = 0xf0000eeb
fault code = supervisor write, page not present
instruction pointer = 0x20:0xc078582f
stack pointer = 0x28:0xcc6f78d8
frame pointer = 0x28:0xcc6f78f4
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = resume, IOPL = 0
current process = 9 (thread taskq)
trap number = 12
panic: page fault
cpuid = 0
Uptime: 54s
Physical memory: 243 MB
Dumping 59 MB: 44 28 12
#0 doadump () at pcpu.h:195
195 pcpu.h: No such file or directory.
in pcpu.h
(kgdb) where
#0 doadump () at pcpu.h:195
#1 0xc0754457 in boot (howto=260) at /usr/src/sys/kern/
kern_shutdown.c:409
#2 0xc0754719 in panic (fmt=Variable "fmt" is not available.
) at /usr/src/sys/kern/kern_shutdown.c:563
#3 0xc0a4905c in trap_fatal (frame=0xcc6f7898, eva=4026535659) at /
usr/src/sys/i386/i386/trap.c:899
#4 0xc0a499df in trap (frame=0xcc6f7898) at /usr/src/sys/i386/i386/
trap.c:280
#5 0xc0a2fc0b in calltrap () at /usr/src/sys/i386/i386/exception.s:139
#6 0xc078582f in turnstile_broadcast (ts=0x0, queue=0) at /usr/src/
sys/kern/subr_turnstile.c:835
#7 0xc0747da2 in _mtx_unlock_sleep (m=0xc2235004, opts=0, file=0x0,
line=0) at /usr/src/sys/kern/kern_mutex.c:605
#8 0xc047b0f9 in dacleanup (periph=0xc255ad80) at cam_periph.h:188
#9 0xc04642bd in camperiphfree (periph=0xc255ad80) at /usr/src/sys/
cam/cam_periph.c:512
#10 0xc046445a in cam_periph_release (periph=0xc255ad80) at /usr/src/
sys/cam/cam_periph.c:302
#11 0xc0479c28 in dasysctlinit (context=0xc255ad80, pending=1) at /usr/
src/sys/cam/scsi/scsi_da.c:1093
#12 0xc0783ed5 in taskqueue_run (queue=0xc21f0e00) at /usr/src/sys/
kern/subr_taskqueue.c:255
#13 0xc07840db in taskqueue_thread_loop (arg=0xc0be0678) at /usr/src/
sys/kern/subr_taskqueue.c:374
#14 0xc0734479 in fork_exit (callout=0xc0784020
<taskqueue_thread_loop>, arg=0xc0be0678, frame=0xcc6f7d38) at /usr/src/
sys/kern/kern_fork.c:781
#15 0xc0a2fc80 in fork_trampoline () at /usr/src/sys/i386/i386/
exception.s:205
(kgdb)
The dmesg from the machine:
Copyright (c) 1992-2008 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 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008
root at logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Xeon(R) CPU E5462 @ 2.80GHz (2807.77-MHz 686-
class CPU)
Origin = "GenuineIntel" Id = 0x10678 Stepping = 8
Features
=
0xfebfbff
<
FPU
,VME
,DE
,PSE
,TSC
,MSR
,PAE
,MCE
,CX8
,APIC
,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS>
Features2=0x80080201<SSE3,SSSE3,<b19>,<b31>>
AMD Features=0x100000<NX>
real memory = 268435456 (256 MB)
avail memory = 248623104 (237 MB)
ACPI APIC Table: <PTLTD APIC >
MADT: Forcing active-low polarity and level trigger for SCI
ioapic0 <Version 1.1> irqs 0-23 on motherboard
kbd1 at kbdmux0
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413,
RF5413)
hptrr: HPT RocketRAID controller driver v1.1 (Feb 24 2008 19:59:27)
acpi0: <PTLTD RSDT> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_throttle0: <ACPI CPU Throttling> on cpu0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel PIIX4 UDMA33 controller> port
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1050-0x105f at device 7.1 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
pci0: <bridge> at device 7.3 (no driver attached)
vgapci0: <VGA-compatible display> port 0x1060-0x106f mem
0xf8000000-0xfbffffff,0xf4000000-0xf47fffff at device 15.0 on pci0
mpt0: <LSILogic 1030 Ultra4 Adapter> port 0x1080-0x10ff mem
0xf4800000-0xf4800fff irq 17 at device 16.0 on pci0
mpt0: [ITHREAD]
mpt0: MPI Version=1.2.0.0
le0: <AMD PCnet-PCI> port 0x1400-0x147f irq 18 at device 17.0 on pci0
le0: 16 receive buffers, 4 transmit buffers
le0: Ethernet address: 00:0c:29:fc:c6:18
le0: [ITHREAD]
acpi_acad0: <AC Adapter> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: [ITHREAD]
psm0: model IntelliMouse, device ID 3
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10
on acpi0
sio0: type 16550A
sio0: [FILTER]
sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
sio1: [FILTER]
fdc0: <floppy drive controller> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on
acpi0
fdc0: [FILTER]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xc7fff,0xca000-0xcafff,
0xdc000-0xdffff,0xe0000-0xe3fff pnpid ORM0000 on isa0
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
ppbus0: [ITHREAD]
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
ppc0: [GIANT-LOCKED]
ppc0: [ITHREAD]
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on
isa0
Timecounter "TSC" frequency 2807770699 Hz quality 800
Timecounters tick every 1.000 msec
hptrr: no controller detected.
acd0: CDROM <VMware Virtual IDE CDROM Drive/00000001> at ata0-master
UDMA33
Waiting 5 seconds for SCSI devices to settle
da0 at mpt0 bus 0 target 0 lun 0
da0: <VMware Virtual disk 1.0> Fixed Direct Access SCSI-2 device
da0: 3.300MB/s transfers
da0: Command Queueing Enabled
da0: 8192MB (16777216 512 byte sectors: 255H 63S/T 1044C)
Trying to mount root from ufs:/dev/da0s1a
WARNING: / was not properly dismounted
WARNING: /tmp was not properly dismounted
WARNING: /usr was not properly dismounted
WARNING: /var was not properly dismounted
As you can see, nothing about da1 until I do camcontrol rescan
I've tried the same setup with OpenBSD, where the disk is detected on
boot and works fine:
mpi0 at pci0 dev 16 function 0 "Symbios Logic 53c1030" rev 0x01: irq 9
scsibus1 at mpi0: 16 targets, initiator 7
sd0 at scsibus1 targ 0 lun 0: <VMware, Virtual disk, 1.0> SCSI2 0/
direct fixed
sd0: 8192MB, 512 bytes/sec, 16777216 sec total
sd1 at scsibus1 targ 1 lun 0: <OPNFILER, VIRTUAL-DISK, 0> SCSI2 0/
direct fixed
sd1: 10016MB, 512 bytes/sec, 20512768 sec total
mpi0: target 0 Sync at 160MHz width 16bit offset 127 QAS 1 DT 1 IU 1
The setup is somewhat stupid right now however, so if it wouldn't be
working in openbsd I would assume it was something with the setup
(FreeBSD/OpenBSD inside VMWare ESXi, which in turn runs inside a
VMWare Fusion, and the iSCSI target is OpenFiler also running inside
the VMWare Fusion). But since it's detected in OpenBSD and seems to
work there, I'd guess this is something FreeBSD specific.
Any input or clues are welcome :) Thanks!
--
Johan
More information about the freebsd-scsi
mailing list