giovedì 5 giugno 2008

[Howto] create fedora 9 xen images (on fedora)

A little howto on creating xen images (using torrent to download the iso instead of using http/ftp during installation).

**On Domain-0**

Get DVD iso
-----------

retrieve the .torrent
> wget http://torrent.fedoraproject.org/torrents/Fedora-9-x86_64-DVD.torrent

download the image with rtorrent (text-based) or any other bittorrent client
> rtorrent Fedora-9-x86_64-DVD.torrent

check the file
> sha1sum -c Fedora-9-x86_64-DVD/SHA1SUM


Mount the image and "create" a repository
--------

Mount the iso image using loop device
> mkdir /mnt/fedora_loop/
> mount -o loop Fedora-9-x86_64-DVD/Fedora-9-x86_64-DVD.iso /mnt/fedora_loop/

Make a symlink in apache (so http://localhost/fedora will be the content of the iso image
this is also helpful if you don't have internet connection here but only the dvd: you can link directly the dvd content and proceed ahead
> ln -s /mnt/fedora_loop/ /var/www/html/fedora

Start httpd service
> service httpd start

Install
-------

Start the install process with virt-install (parameters are optional)
> virt-install -b xenbr1 -s 16 -f /xen/fedora9.img -n fedora9 -r 256 --nographics -l http://192.168.1.1/fedora

*where 192.168.1.1 is Domain-0's IP address*

Nessun commento: