Hi, Once upon a time I''d manually create domU with `dd if=/dev/zero of=/path/to/xen_image.img options`. I''ve started using virt-install but would like to know how one mounts the image created by this command. Trivial to mount an image created by dd; file /xen/bx2g.img /xen/bx2g.img: Linux rev 1.0 ext3 filesystem data (large files) Note sure how to mount one created by virt-install file /xen/cx32bit.img /xen/cx32bit.img: x86 boot sector; partition 1: ID=0x83, active, starthead 1, startsector 63, 208782 sectors; partition 2: ID=0x83, starthead 0, startsector 208845, 398\ 4120 sectors, code offset 0x48 /sys/john _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
John Haxby
2009-May-18 11:08 UTC
Re: [Xen-users] Mounting images created with virt-install
John Maclen wrote:> Note sure how to mount one created by virt-install > > file /xen/cx32bit.img > /xen/cx32bit.img: x86 boot sector; partition 1: ID=0x83, active, > starthead 1, startsector 63, 208782 sectors; partition 2: ID=0x83, > starthead 0, startsector 208845, 398\ > 4120 sectors, code offset 0x48 >Use losetup to create a /dev/loopN for the image file and then kpartx to create device files for the partitions. If one of the partitions is used for LVM you''ll need to activate the volume group (and if that''s the same name as a volume group in dom0 you''re in for some head scratching). See the man pages for losetup, kpartx and vgscan / vgchange. Oh, and despite the name, kpartx does not have anything to do with KDE or X. jch _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users