|   xen-users
Re: [Xen-users] Guest O/S Questions 
| 
Karsten M. Self wrote:
 That's actually getting to be a preferred method here, at least for 
some folks.
qemu file-backed installs allow you to use an existing RHEL installer, 
without much fuss or mess, the tricky bit is finding the filesystem 
afterward, as what qemu produces is a _partitioned_ file with 
filesystems within it. 
Or you can just expose as a device with a partition table.  IMHO, this 
is the best approach. 
I've even had success resizing the disk image, and then (using a boot 
disk), appropriately resizing the filesystem. 
 
dd skip=63 bs=512 if=qemu.img of=xen.img
Keep in mind, I've not tried this myself :-)
Exporting the qemu image as /dev/hda in domU and just setting your 
parameters right seems to work well and is much simplier.
 
Are you doing this with the qemu partitioned file itself?
 
Yup.
My xend config line looks like this:
disk = [ 'file:/root/FC4.img,hda,w' ]
root = "/dev/hda1"
That just works.  There shouldn't be any disadvantage to using this 
method (other than it makes resizing individual partitions a bit more 
difficult). 
 
   The first partition is /boot, the second is /.  I didn't use logical
   volumes, though it's possible to do so, complicating matters
   somewhat more.
 
If you want to extract the filesystems, I'd recommend using lomount as 
Ian suggests (and then just tar up the partitions). 
 
5. Loopback mount the qemu images, creating a couple of mountpoints.
   Using the file I'm referencing above (rhel4):
       mkdir mp1 mp2
       su -c 'mount -o loop,offset=$(( 63 * 512 )) -t ext3 rhel4 mp1'
su -c 'mount -o loop,offset=$(( 4192964 * 512 )) -t ext3 rhel4 
mp2'
As a final step, you could copy the contents of these two mountpoints
into a partition or a single filesystem image (a file with just a
filesystem in it, no partitions) which can be used for a Xen file-backed
DomU, etc.
 
There's a few things you'll want to do once you do the QEMU install.  
Namely, you'll want to make sure to install the appropriate modules (and 
run depmod). 
Otherwise, it just works.
The next logical step is to run QEMU within a domU and automate the 
whole process. 
QEMU is a pretty amazing little piece of software :-)
Regards,
Anthony Liguori
 
You will have to modify the DomU's /etc/fstab and likely comment the MAC
address registered in /etc/sysconfig/network-scripts/ifcfg-eth0 for
things to work properly.
Once you have a suitable image, you can simply use it as a DomU image 
for new deployments. 
There are some good related docs on Fedora and Debian installs as well:
https://www.redhat.com/archives/fedora-devel-list/2005-January/msg01320.html 
http://www.fedoraproject.org/wiki/FedoraXenQuickstart
Debian:  http://hands.com/d-i/HOWTO-xen.txt
 
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
 | 
 
| <Prev in Thread] | Current Thread | [Next in Thread> |  | 
RE: [Xen-users] Guest O/S Questions, Mike Tierney[Xen-users] Guest O/S Questions, Nick Couchman
Re: [Xen-users] Guest O/S Questions, Mark Williamson
Re: [Xen-users] Guest O/S Questions, Anthony Liguori
Re: [Xen-users] Guest O/S Questions, Mark Williamson
Re: [Xen-users] Guest O/S Questions, Karsten M. Self
Re: [Xen-users] Guest O/S Questions, Karsten M. Self
Re: [Xen-users] Guest O/S Questions,
Anthony Liguori <=
Re: [Xen-users] Guest O/S Questions, Karsten M. Self
Re: [Xen-users] Guest O/S Questions, Anthony Liguori
Re: [Xen-users] Guest O/S Questions, Marcus Brown
Re: [Xen-users] Guest O/S Questions, Anthony Liguori
Re: [Xen-users] Guest O/S Questions, Marcus Brown
Re: [Xen-users] Guest O/S Questions, Anthony Liguori
Re: [Xen-users] Guest O/S Questions, Karsten M. Self
 |  |  |