WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

RE: [Xen-users] Mounting RHEL 4 virtual machine disks (dd/mount -oloop)

On Tue, 17 Apr 2007, Kraska, Joe A (US SSA) wrote:
Mkay. Maybe it wasn't obvious but "hda" in the above mount command is
the
Xen image file. It was the file made with dd, into which RHEL44 was
installed
using Qemu. I'm a bit confused in your instructions, because you seem to
be
forwarding me to a /dev/hda, and don't reference my file based image at
all.
That I can see.

Ahh.  my mistake then.

it's

losetup /dev/loop1 /path/to/file

now /dev/loop1 (you may need to increment or decrement the 1 to get a free loop device) is a device in the Dom0 that looks a lot like how the DomU would see /dev/hda.

so now you go from /dev/loop1  to the sub-partitions.
kpartx -av /dev/loop1
would be how you would do it if it were straight partitions.

with lvm, you need to vgscan it, but from what I understand, vgscan scans all devices, including or excluding certain devices in the lvm config files. (on my system, /etc/lvm/lvm.conf specifies a filter= that excludes the cdrom device) You need to somehow get vgscan to read /dev/loop1.

(it is possible that just 'vgscan' or 'lvscan' after you do the losetup will do the job.)

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users