Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Format of guest image files?: msg#00131

Subject: Re: Format of guest image files?
Andrew,

Thanks for the reply - see inline comments:


On Tue, 2006-12-26 at 08:23 -0500, Andrew Cathrow wrote:
> Let's say that your image is called /var/lib/xen/images/disk.img
> 
> First you need to access that file like a loopback device 
> 
> losetup -f /var/lib/xen/images/disk.img
> 
> that will create a device like /dev/loop0


OK, that seemed to work.


> If you run "losetup -a" you'll get a list of the loopback devices that
> are configured.


I get:

        /dev/loop0: [0344]:49158 (/home/fc6v1)


> Lets presume that it was /dev/loop0 that was created.


Correct.


> You have a device now but you don't have partitions yet.
> You can do fdisk -l /dev/loop0  to see what partitions are in the
> loopback device but you can't access them yet.


I get:

Disk /dev/loop0: 1610 MB, 1610612736 bytes
255 heads, 63 sectors/track, 195 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

      Device Boot      Start         End      Blocks   Id  System
/dev/loop0p1   *           1         195     1566306   83  Linux


> You need to use kpartx to add the partition mappings.
> 
> kpartx -a /dev/loop0 
> 
> This will add partition mappings under /dev/mapper.


I now have:

        brw-rw----  1 root disk 253,  0 Dec 27 04:32 loop0p1


> You should now be able to access these like regular partitions.
> If you used LVM during your install then you'll need to do a vgscan
> and a vgchange -ay to activate the volume groups. 
> Now you can mount the partitions/logical volumes.


Yes, when I do:

        mount /dev/mapper/loop0p1 /mnt

I can then see all the directories under /mnt!


> At this point I hope you didn't use the default partitioning for both
> the guest and the host, otherwise you'll have duplicate VG names.


No, I used one big 1.5GB partition - I avoid using LVM usually anyway.

Many thanks!

Now I just have to work out how to get a REALLY minimal guest install -
a la The RULE Project or The FedoraCD project, although as an exercise I
will probably reduce the RPMs in the current guest as much as possible
myself to begin with.

Regards,

Phil.


> There is a way to rename volume groups but that's a story for another
> day .....
> 
> 
> 
> On Tue, 2006-12-26 at 19:28 +1100, Phil Rhoades wrote: 
> > People,
> > 
> > Firstly, congratulations on some nice work! - I could not get
> > inter-guest or host-guest networking on FC5 but it started working
> > immediately on FC6 - thanks!
> > 
> > On a FC6 host I have created a FC6 guest minimal install (everything
> > checked off except for text networking) in a 1.5GB image file.  What is
> > the format of this image?  Is it possible to somehow use a loopback
> > switch to mount it like iso9660? - I want to be able to make a copy of
> > the image file; in the image, edit the /etc/sysconfig/network
> > and /etc/sysconfig/network-scripts/ifcfg-eth0 files; add an
> > appropriate /etc/xen config file and then be able to boot a second
> > guest.  Is this possible somehow?
> > 
> > Thanks,
> > 
> > Phil.
-- 
Philip Rhoades

Pricom Pty Limited  (ACN 003 252 275  ABN 91 003 252 275)
GPO Box 3411
Sydney NSW      2001
Australia
Mobile:  +61:(0)411-185-652
Fax:     +61:(0)2-8221-9599
E-mail:  phil@xxxxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe