[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Simple script help

> ./xi_build will not accept gzipp'ed images. Either copy the
> non-gzipped image, or gunzip the image after copying.
> A couple of the other xi_* tools now use zlib. I'll add that
> functionality to xi_build in the unstable tree.


> > This is the script:
> > 
> > #!/bin/sh
> > 
> > name=XenoLinux
> > size=65536
> > id=$1
> > ip=$2
> > gw=
> > mask=
> > root=$3
> > swap=$4
> > 
> > xi_create $size "$name"
> > cp /boot/xenolinux-1.1rc1.gz /tmp/xen-image.tmp
> > xi_build $id /tmp/xen-image.tmp $id ip=$ip::$gw:$mask::eth0:off DOMID=$id 
> > root=/dev/$root ro
> > xi_vifinit $id 0 $ip
> > xi_phys_grant rw $id $root
> > xi_phys_grant rw $id $swap

A couple of points to help head off the next questions at the pass: 

1) You should have $id == the domain id (returned from xi_create), e.g 
   id=`xi_create $size $name`

2) At the end you need to start the domain, e.g. 
   xi_start $id 

> > Also, xi_phys_grant needs some additional params, what should I
> > use for them?

xi_phys_grant (like most of the internal tools) isn't really designed 
with user friendliness in mind; if at all possible you should try to 
use xenctl, e.g. 

xenctl physical grant -phda3 -w -n$id 

will grant read-write access to the partition /dev/hda3 to the domain
that's just been created. This doesn't go near the xml stuff which 
you had some unspecified problem with. 

If you really want to us xi_phys_grant directly the  typing just 
xi_phys_grant should get you the error message: 

Usage: xi_physdev_grant_new <r/rw> <domain> <device> <start sector> <n_sectors> 

The first two are fairly obvious; the <device> is the linux device
number in question (e.g. for partition /dev/hda3 this would be 0x0800) 
the start_sector is the first sector that partition (see /proc/partitions) 
and n_sectors the number of them (ditto). Finally partition is the
partition number (e.g. in the case of /dev/hda3 it would be 3). 



This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.