Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: A question about the disk for the domain



On Sun, Jan 18, 2009 at 08:01:57PM +0100, Damian Sobczak wrote:
> Hello,
> 
> How I understand that... I would create an unprivileged domain on my
> partition /dev/wd0p. This partition is only for xen domains.
> 
> Can I create several domains on the one partition without to create an
> file image? I do not think so.

Right, you can't. You can't export the same physical partition to multiple
domains (well, in thery you could if it's exported read-only to all
domains ...)

> 
> What I don't understand, what its the VDEV. Ok, we can read that "VDEV
> is the device name the domain will see". But what does it mean?
> 
> I have read (NetBSD Xen How-to) that "VDEV doesn't really matter for a
> NetBSD guest OS"
> but it is for Linux and for Solaris, right?

It does for linux; I don't know about solaris. Also, the number given
to vdev appears in the NetBSD domU's device properties:
xbd0 at xenbus0 id 1: Xen Virtual Block Device Interface

the 'id 1' is because we used VDEV=1 in the domain's config file.
In doesn't matter because in the XEN3_DOMU kernel config file we have:
xbd*            at xenbus? id ?
(well, id ? isn't there but it's wilcarded by default). We could use this
to hardwire devices if needed:
xbd0 at xenbus0 id 1
xbd1 at xenbus0 id 2

> How I define this. I have
> here 3 examples from NetBSD how to and from the Xen Virtualization A
> Practical Handbook :
> 
> 1. For NetBSD domU
> 
> disk = [ 'phy:/dev/wd0e,0x1,w' ]
> #disk = [ 'file:/var/xen/nbsd-disk,0x01,w' ]
> #disk = [ 'file:/var/xen/nbsd-disk,0x301,w' ]
> 
> 2. For Solaris domU
> 
> disk =  [ 'phy:/dev/sd1a,0,w' ]
> 
> 3.  Xen Virtualization A Practical Handbook
> 
> disk = ['tap:aio:/home/pchaganti/xen-images/netbsd_domU.img,sda1,w',
> 'tap:aio:/home/pchaganti/xen-images/netbsd_swap.img,sda2,w']
> 
> What does it mean 0x1, 0x01, 0 for Solaris and sda2 in Handbook?

instead of a number you can use a linux device name for vdev, in this
case the xentools will convert it to a linux device number (which encodes
device major and device minor numbers).
E.g. for hda1 xentools will use 0x301.
See above for how a NetBSD domU kernel will use this number.
A linux domU will use it to know how name the virtual disk:
if it's 0x300, the virtual disk will be named 'hda' in the domU.
if it's 0x2200, the virtual disk will be named 'hdc' in the domU.
If it's 0x800 the virtual disk will be named 'sda'

-- 
Manuel Bouyer, LIP6, Universite Paris VI.           
Manuel.Bouyer%lip6.fr@localhost
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index