[Fedora-xen] (no subject)

David Shwatrz dshwatrz at gmail.com
Sat Mar 17 11:48:24 UTC 2007


Hello,
Thanks a lot!
>Look under "Accessing guest disk image"

I did so; It could be that there is a slight error in that wiki page, or
that
something in my configuration is a bit different.
I tried to mount an image which was installed on a regular  file.
It was slightly different than the wiki; any case I did manage
to solve it ; down below is what problem I had and how it was solved,
so that others may benefit from it (and maybe the wiki should be changed, I
really do
not know).
The "Accessing guest disk image" says:
"Note that this only works for block devices, not for images installed on
regular
files. To use file images, you'll need to set up a loopback device for the
file
first:
# losetup -f
/dev/loop0
# losetup /dev/loop0 /xen/images/MyImagefile.img
# kpartx -av /dev/loop0
add map loop0p1 : 0 208782 linear /dev/loop0 63
add map loop0p2 : 0 12370050 linear /dev/loop0 208845
In this case we have added an image formatted as a default Fedora install,
so it has two partitions: one /boot, and one LVM volume
containing everything else. They are accessible under /dev/mapper:
# ls -l /dev/mapper/ | grep guest1"

***In my case***, ls -l /dev/mapper/ does ***NOT*** contain guest1;
ls -l /dev/mapper/ shows:
crw------- 1 root root  10, 62 Mar 17 11:43 control
brw-rw---- 1 root disk 253,  0 Mar 17 13:22 loop0p1
brw-rw---- 1 root disk 253,  1 Mar 17 13:22 loop0p2

But continuing with
mount /dev/mapper/loop0p1 /mnt/boot/
instead:
mount /dev/mapper/guest1p1 /mnt/boot/ (as in the Wiki)
did the job.

The same is for kpartx:
kpartx -a  /dev/mapper/loop0p2
and then :vgscan
**instead of:**
kpartx -a /dev/xen/guest1
and then :vgscan
(as in the wiki)
did the job.
Regards,
DS




On 3/16/07, Andrew Cathrow <acathrow at redhat.com> wrote:
>
>  On Fri, 2007-03-16 at 18:47 +0200, David Shwatrz wrote:
>
> Hello,
>
> I had created an image file with virt-install under Fedora 6 with
> something like:
>
> virt-install -n guset2 -r 256 -s 4 -f
> /var/lib/xen/images/guest2/guest2File -l
> ftp://mirrors.hpcf.upr.edu/pub/Mirrors/redhat/download.fedora.redhat.com/6/i386/os-p --nographics
>
> Is there a way to mount Read-Write or Read-Only this file
> (/var/lib/xen/images/guest2/guest2File) from within dom0 ?
>
>
> http://www.fedoraproject.org/wiki/FedoraXenQuickstartFC6
>
> Look under "Accessing guest disk image"
>
>
> Regards ,
> DS
>
> --Fedora-xen mailing listFedora-xen at redhat.comhttps://www.redhat.com/mailman/listinfo/fedora-xen
>
>     --
>
> Andrew Cathrow
> Red Hat, Inc.
>
> (678) 733 0452 - Mobile
> (404) 437 6178 - Home Office
>
> acathrow at redhat.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-xen/attachments/20070317/c9e136b8/attachment.htm>


More information about the Fedora-xen mailing list