Subject: Problem using Xen / NetBSD domU
To: None <port-xen@NetBSD.org>
From: Eric Delcamp <eric.delcamp@free.fr>
List: port-xen
Date: 12/10/2005 16:20:24
Hi,

I have a real pain to make a working setup for using a NetBSD domU.
---------
emule# uname -a
NetBSD emule 3.99.11 NetBSD 3.99.11 (XEN0) #0: Sun Nov 20 03:44:33 CET 
2005  root@emule:/usr/obj/sys/arch/i386/compile/XEN0 i386

emule# pkg_info | grep xen
xentools20-2.0.7nb3 Userland Tools for Xen
xenkernel20-2.0.7   Xen Kernel

emule# m nbsd.cfg
#  -*- mode: python; -*-
#============================================================================
kernel = "/xen/netbsd-3.0.RC5.XENU-INSTALL"

memory = 128
name = "nbsd"
cpu = -1   # leave to Xen to pick

nics = 1
vif = [ 'mac=aa:00:00:50:02:f0, bridge=bridge0' ]
ip = "10.0.0.10"
netmask = "255.0.0.0"
gateway = "10.0.0.1"

disk = [ 'phy:/dev/wd1a,wd0d,w' ]
#disk = [ 'phy:/dev/vnd0a,wd0d,w' ]
#disk = [ 'file:/var/xen/nbsd-disk,wd0d,w' ]

emule# fdisk wd1
Disk: /dev/rwd1d
NetBSD disklabel disk geometry:
cylinders: 158816, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 160086528

BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 160086528

Partition table:
0: NetBSD (sysid 169)
    start 63, size 160086465 (78167 MB, Cyls 0-9964/236/1), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.

emule# disklabel wd1
# /dev/rwd1d:
type: unknown
disk: Maxtor 6Y080L0
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 158816
total sectors: 160086528
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:  16007168        63     4.2BSD   1024  8192 46536  # (Cyl.      0*-  
15880*)
 b:    524288  16007231       swap                     # (Cyl.  15880*-  
16400*)
 c: 160086465        63     unused      0     0        # (Cyl.      0*- 
158815)
 d: 160086528         0     unused      0     0        # (Cyl.      0 - 
158815)

---------
I'm trying to use wd1a as root for my NetBSD domU (and maybe wd1b as 
swap if possible).
I've tried a lot of different configurations. Each time, I have to think 
a LOT during install process to size my partitions (sometimes it take my 
whole disk and not only wd1a, sometimes it's starting at sector 0, 
sometimes I dont have the swap partition). But if I change something or 
nothing, I'm still stuck, after asking if I want to write after MBR 
(choosing yes or no dont change anything) to a "WRITE ERROR" under domU, 
and a "xbd IO domain 4: error 30" to dom0 console.
I have also tried to use a file instead of physical partitions. Same 
problem.
I'm still searching a real noob documentation about setting a domU, 
http://www.netbsd.org/Ports/xen/howto.html is a good start but dont talk 
about how to prepare a file or a partition / disk before.

Could you help me ?

Thanks.