Discussion:
openbsd 6.4 as guest VM on Xen cannot detect disk
yeddahbi
2018-11-28 17:40:29 UTC
Permalink
Hello there,

I have been struggling to create a obsd 6.4 VM on xen(4.10.1) with HVM.
After booting from the CD (install64.iso as a virtual cdrom), the installer
cannot detect the disk to install the OS.
During the installation, the installer says: "Available disks are: none."

I already have a obsd 6.0 VM instance running for a while, I tried to do the
same with the installer from 6.0 (install60.iso)
The installer worked fined and detected the disk as wd0 device.

See below the boot console output of both versions (obsd6.4 and obsd6.0)

In the obsd6.4 output, I noticed the following timeout which could explain
why the disk is not detected.
xbf0 at xen0 backend 0 channel 5: disk
xbf0: timed out waiting for backend to connect
xbf1 at xen0 backend 0 channel 5: cdrom

I tried multiple configurations of guest VM on Xen, but cannot find a way to
make it work with the 6.4 installer.

Any idea of what could going on?
Any help would be appreciated.

Regards,
Youssef



OBSD6.4 console output
----------------------
boot>
cannot open cd0a:/etc/random.seed: No such file or directory
booting cd0a:/6.4/amd64/bsd.rd: 3511114+1500160+3892040+0+598016
[372715+111+441072+293323]=0xa208a0
entry point at 0x1000158
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2018 OpenBSD. All rights reserved.
https://www.OpenBSD.org

OpenBSD 6.4 (RAMDISK_CD) #348: Thu Oct 11 13:36:16 MDT 2018
***@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 1048571904 (999MB)
avail mem = 1013063680 (966MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xfc001000 (11 entries)
bios0: vendor Xen version "4.10.1_08-lp150.2.9" date 08/17/2018
bios0: Xen HVM domU
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC HPET WAET SSDT SSDT
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 11, 48 pins, remapped
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz, 3492.32 MHz, 06-3c-03
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: apic clock running at 99MHz
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu at acpi0 not configured
"PNP0B00" at acpi0 not configured
"ACPI0007" at acpi0 not configured
pvbus0 at mainbus0: Xen 4.10
xen0 at pvbus0: features 0x2705, 32 grant table frames, event channel 1
xbf0 at xen0 backend 0 channel 5: disk
xbf0: timed out waiting for backend to connect
xbf1 at xen0 backend 0 channel 5: cdrom
scsibus0 at xbf1: 2 targets
cd0 at scsibus0 targ 0 lun 0: <Xen, qdisk hdb 832, 0000> SCSI3 5/cdrom fixed
"vkbd" at xen0: device/vkbd/0 not configured
xnf0 at xen0 backend 0 channel 6: address 00:16:3e:a4:6f:cb
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
"Intel 82371SB ISA" rev 0x00 at pci0 dev 1 function 0 not configured
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel
0 wired to compatibility, channel 1 wired to compatibility
atapiscsi0 at pciide0 channel 0 drive 1
scsibus1 at atapiscsi0: 2 targets
cd1 at scsibus1 targ 0 lun 0: <QEMU, QEMU DVD-ROM, 2.5+> ATAPI 5/cdrom
removable
cd1(pciide0:0:1): using PIO mode 4, DMA mode 2
pciide0: channel 1 disabled (no drives)
"Intel 82371AB Power" rev 0x03 at pci0 dev 1 function 3 not configured
xspd0 at pci0 dev 2 function 0 "XenSource Platform Device" rev 0x01
vga1 at pci0 dev 3 function 0 "Cirrus Logic CL-GD5446" rev 0x00
vga1: aperture needed
wsdisplay1 at vga1 mux 1: console (80x25, vt100 emulation)
isa0 at mainbus0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay1
softraid0 at root
scsibus2 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.4 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell?


OBSD6.0 console output
----------------------
boot>
cannot open cd0a:/etc/random.seed: No such file or directory
booting cd0a:/6.0/amd64/bsd.rd: 3351980+1411120+2413568+0+585728
[72+440424+283008]=0x819cb0
entry point at 0x1001000 [7205c766, 34000004, 24448b12, b4c0a304]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2016 OpenBSD. All rights reserved.
http://www.OpenBSD.org

OpenBSD 6.0 (RAMDISK_CD) #2100: Tue Jul 26 13:05:59 MDT 2016
***@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 1048571904 (999MB)
avail mem = 1015132160 (968MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xfc001000 (11 entries)
bios0: vendor Xen version "4.10.1_08-lp150.2.9" date 08/17/2018
bios0: Xen HVM domU
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC HPET WAET SSDT SSDT
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 11, 48 pins
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz, 3492.35 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: apic clock running at 100MHz
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu at acpi0 not configured
"PNP0F13" at acpi0 not configured
"PNP0303" at acpi0 not configured
"PNP0700" at acpi0 not configured
"PNP0501" at acpi0 not configured
"ACPI0007" at acpi0 not configured
pvbus0 at mainbus0: Xen 4.10
xen0 at pvbus0: features 0x2705, 32 grant table frames, event channel 1
"vbd" at xen0: device/vbd/768 not configured
"vbd" at xen0: device/vbd/832 not configured
"vkbd" at xen0: device/vkbd/0 not configured
xnf0 at xen0: backend 0, event channel 5, address 00:16:3e:cf:a8:61
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
"Intel 82371SB ISA" rev 0x00 at pci0 dev 1 function 0 not configured
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel
0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <QEMU HARDDISK>
wd0: 16-sector PIO, LBA48, 10240MB, 20971520 sectors
atapiscsi0 at pciide0 channel 0 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <QEMU, QEMU DVD-ROM, 2.5+> ATAPI 5/cdrom
removable
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2
cd0(pciide0:0:1): using PIO mode 4, DMA mode 2
pciide0: channel 1 disabled (no drives)
"Intel 82371AB Power" rev 0x03 at pci0 dev 1 function 3 not configured
xspd0 at pci0 dev 2 function 0 "XenSource Platform Device" rev 0x01
vga1 at pci0 dev 3 function 0 "Cirrus Logic CL-GD5446" rev 0x00
vga1: aperture needed
wsdisplay1 at vga1 mux 1: console (80x25, vt100 emulation)
isa0 at mainbus0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay1
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.0 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell?








--
Sent from: http://openbsd-archive.7691.n7.nabble.com/openbsd-user-misc-f3.html
yeddahbi
2018-11-29 19:35:28 UTC
Permalink
Hello there,

Has anybody successfully run the 6.4 installer on a VM running on a Xen
Host?
I tried enabling more logs during boot (boot_config->verbose) and got the
following logs (extract, not full log).
Any suggestions on how to troubleshoot this issue ?
Regards,

pvbus0 at mainbus0: Xen 4.10
probing for xen0
xen0 at pvbus0: features 0x2705, 32 grant table frames, event channel 1
probing for xnf*
xnf probe returned 0
probing for xbf*
xbf probe returned 1
xbf probe won
xbf0 at xen0 backend 0 channel 5: cdrom
probing for scsibus*
scsibus probe returned 1
scsibus probe won
scsibus0 at xbf0: 2 targets
probing for cd*
cd probe returned 2
probing for sd*
sd probe returned 0
probing for st*
st probe returned 0
cd probe won
cd0 at scsibus0 targ 0 lun 0: <Xen, qdisk sda 2048, 0000> SCSI3 5/cdrom
fixed
probing for xnf*
xnf probe returned 0
probing for xbf*
xbf probe returned 1
xbf probe won
xbf1 at xen0 backend 0 channel 6: disk
xbf1: timed out waiting for backend to connect




--
Sent from: http://openbsd-archive.7691.n7.nabble.com/openbsd-user-misc-f3.html
Andrew Daugherity
2018-12-01 00:52:17 UTC
Permalink
I have no idea what is causing your backend timeout, but your VM
config would be useful information, and take a look at xend.log etc.
on the host for any related errors (if you have access to it). I'm
running OpenBSD 6.4 just fine under Xen; however my Dom0 is only 4.4.4
(dmesg attached).

Note that in your 6.0 dmesg, you have "wd0 at pciide0" vs. my "sd0 at
scsibus1" via "scsibus1 at xbf0"; the man page for xbf(4) indicates it
was added in 6.1, and that it takes over all virtual disks. As a
workaround, you might try boot -c and disable xbf, which would
presumably present your disk via the emulated IDE controller.

-Andrew
yeddahbi
2018-12-03 23:12:16 UTC
Permalink
Hello,

Thank you for the reply and information.
I have also tried to use scsi controller on the VM with the same result. See
below the dmesg and VM configuration.

Also, since I do have access to the xen host, I have looked at the logs
under /var/log/xen and I found the following errors:

==> xen/qemu-dm-obsd_64_wks.log <==
xen be: qdisk-2080: xen be: qdisk-2080: error: Failed to get "write" lock
error: Failed to get "write" lock
xen be: qdisk-2080: xen be: qdisk-2080: initialise() failed
initialise() failed

I have also tried to disable xbf (through boot -c). It allowed the detection
of the disk and the installation went through, but at the next boot the disk
was not detected. I guess, I would need to save the boot config but I don’t
think it is the right approach. I would prefer to make it work without
having to disable xbf.


dmesg:
---------
boot>
cannot open cd0a:/etc/random.seed: No such file or directory
booting cd0a:/6.4/amd64/bsd.rd: 3511114+1500160+3892040+0+598016
[372715+111+441072+293323]=0xa208a0
entry point at 0x1000158
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2018 OpenBSD. All rights reserved.
https://www.OpenBSD.org

OpenBSD 6.4 (RAMDISK_CD) #348: Thu Oct 11 13:36:16 MDT 2018
***@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 1048571904 (999MB)
avail mem = 1013063680 (966MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xfc001000 (11 entries)
bios0: vendor Xen version "4.10.1_08-lp150.2.9" date 08/17/2018
bios0: Xen HVM domU
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC HPET WAET SSDT SSDT
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 11, 48 pins, remapped
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz, 3492.36 MHz, 06-3c-03
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,FSGSBASE,BMI1,HLE,AVX2,SME
P,BMI2,ERMS,INVPCID,RTM,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: apic clock running at 100MHz
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu at acpi0 not configured
"PNP0B00" at acpi0 not configured
"ACPI0007" at acpi0 not configured
pvbus0 at mainbus0: Xen 4.10
xen0 at pvbus0: features 0x2705, 32 grant table frames, event channel 1
xbf0 at xen0 backend 0 channel 5: cdrom
scsibus0 at xbf0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <Xen, qdisk sda 2048, 0000> SCSI3 5/cdrom
fixed
xbf1 at xen0 backend 0 channel 6: disk
xbf1: timed out waiting for backend to connect
"vkbd" at xen0: device/vkbd/0 not configured
xnf0 at xen0 backend 0 channel 6: address 00:16:3e:b7:63:d9
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
"Intel 82371SB ISA" rev 0x00 at pci0 dev 1 function 0 not configured
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel
0 wired to compatibility, channel 1 wired to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd1 at scsibus1 targ 0 lun 0: <QEMU, QEMU DVD-ROM, 2.5+> ATAPI 5/cdrom
removable
cd1(pciide0:0:0): using PIO mode 4, DMA mode 2
pciide0: channel 1 disabled (no drives)
"Intel 82371AB Power" rev 0x03 at pci0 dev 1 function 3 not configured
xspd0 at pci0 dev 3 function 0 "XenSource Platform Device" rev 0x01
vga1 at pci0 dev 4 function 0 "Cirrus Logic CL-GD5446" rev 0x00
vga1: aperture needed
wsdisplay1 at vga1 mux 1: console (80x25, vt100 emulation)
isa0 at mainbus0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay1
softraid0 at root
scsibus2 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.4 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell?


VM configuration:
-----------------



<domain type='xen'>
<name>obsd_64_wks</name>
<uuid>71f9452e-62f8-4e6c-9a94-89f80c87d8dc</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='xenfv'>hvm</type>
<loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
<boot dev='cdrom'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/lib/xen/bin/qemu-system-i386</emulator>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/data/vm/installs/obsd6.4/install64.iso'/>
<target dev='sda' bus='scsi'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/data/vm/obsd/obsd_64_wks.img'/>
<target dev='sdc' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='2'/>
</disk>
<controller type='ide' index='0'/>
<controller type='scsi' index='0'/>
<interface type='bridge'>
<mac address='00:16:3e:b7:63:d9'/>
<source bridge='br0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='en-us'>
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
</devices>
</domain>



--
Sent from: http://openbsd-archive.7691.n7.nabble.com/openbsd-user-misc-f3.html
Loading...