Port-xen archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Configuring domU filesystem image from dom0
You could use a file-backed image (vnd) to disklabel it, format, and extract/configure. Then dd the file onto the LV.
Unfortunately, you won't be able to make subsequent modifications from the dom0 after its written to the LV unless you reverse the procedure to attain a file-backed image.
Alternatively, you can do as you suggested and present the disk to domU as a label-less, single file system. The default disklabel will have an "a" partition of type 4.2BSD. I've only used this approach for secondary and tertiary virtual disks.
-Brian
> On Jun 29, 2016, at 5:33 PM, Alaric Snell-Pym <alaric%snell-pym.org.uk@localhost> wrote:
>
> Ok, this isn't strictly a Xen question, but it's something that probably
> only Xen users ever need to do...
>
> So, the HOWTO mentions that one can either run an INSTALL kernel in a
> domU, or extract the sets into the domU root filesystem image from dom0
> when setting it up. I want to do the latter, as I can also set up /etc
> and (in theory) have a fully bootable and configured system ready to go
> the first time the domU starts.
>
> But: How does one do this in practice? I have created my nice LVM LV for
> my domU root. I can newfs it and mount it as a filesystem, but of
> course, the domU kernel sees it as an entire disk, and so expects a
> disklabel.
>
> But I can't seem to disklabel my LV from dom0. This is no surprise;
> devices like /dev/wd0 have a range of minor numbers, one per disklabel
> partition, while devices like /dev/mapper/vg0-vm2--root have but one
> minor number; to represent the partitions, I presume dk(4) wedges would
> need to come to the rescue.
>
> However, the disklabel tool doesn't seem to let me modify the disklabel
> on my LV; it just complains about inappropriate ioctls. I don't need it
> to mess with the in-core disklabel used by conventional disk devices to
> make all their different minor numbers point here and there; for an LV,
> there isn't one, and I presume I'll need to do that manually with dk
> wedges. But how do I get a disklabel written into the LV so that my domU
> can see it and find its root partition on boot?
>
> Or should I use the entire LV as a filesystem for dom0's sake, and then
> somehow tell the domU to treat it as such? "root on xbd0d" or similar?
>
> Thanks,
>
> ABS
>
> --
> Alaric Snell-Pym
> http://www.snell-pym.org.uk/alaric/
>
Home |
Main Index |
Thread Index |
Old Index