Port-xen archive

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

Re: installing a 4.1 DOMU



On Wed, 18 Jul 2012 12:36:24 +0100
Jean-Yves Migeon <jeanyves.migeon%free.fr@localhost> wrote:

> That depends on how you declared your partitions and exposed them to 
> domU.
> 
> If the domU tries to overwrite the sector containing the labels then 
> the dom0 backend will likely return EROFS, hence "read only 
> file-system." See [1] for an example.

Sorry for not being clear.  See below.

> Using phy: declares a device, so anything passed as a device will be 
> used as a virtual disk, _even_ if it is a partition/label within dom0.
> 
> Let's illustrate this: suppose you create a disk.img file, then label 
> it through vnd(4). What you do is:
> - vnconfig -c vnd0 disk.img # declares disk as a vnd(4) device
> - disklabel vnd0            # create labels in disk.img
> 
> Now you have labels on the vnd0 device, vnd0 is the whole disk (but
> not necessarily vnd0a as the label does not necessarily covers the
> whole disk).

In my case both the a: and d: partitions covered the whole disk (=
disk.img in your example).  Of course, they differ in filesystem type
(4.2BSD versus unused).  Reading the thread you quoted [1], it seems
that the primary issue is how the kernel handles a region of the disk
that includes the disk label.  Partition a: includes the read-only
disklabel sector and enforces read-only semantics, whereas partition d:
does not enforce the same semantics.  Thus, I should have been using
vnd0d.

> If you pass phy:/dev/vnd0a, you are saying: "label/partition a will
> act as a virtual disk with regard to domU." It will be treated as a
> disk within domU, and used as one.

Yes, that is what I intended.  From above I guess what I really wanted
was to pass phy:/dev/vnd0d. When I do this, the disklabel can be
written within sysinst in DOMU just fine.

So, in the end, I have the following:

disk = [ 'phy:/dev/vnd0d,xvda,w' ]
root = "xbd0a"

> That's why it is preferable to use file:/path/disk.img for image
> files, because you expose the entire file as a disk to the domU, so
> they are treated the same way whether you use them within domU
> (through xbd(4)), or within dom0 (through vnd(4)).

I'm not sure I know what 'that' refers to, but now I think I understand
it much better.

Yes, it would be more direct to use file:, but that seems not to be
supported with xl.  I suppose that will come in time.

> Hope that it is now a bit clearer :)

Yes, much clearer.  Thanks for your help and for your work on this.

Cheers,
Brook

[1] 
http://www.kerneltrap.com/mailarchive/netbsd-tech-kern/2008/12/14/4416334


Home | Main Index | Thread Index | Old Index