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-devel

Re: [Xen-devel] Simple script help

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Simple script help
From: Steven Hand <Steven.Hand@xxxxxxxxxxxx>
Date: Wed, 12 Nov 2003 10:40:31 +0000
Cc: "Tvrtko A. Uršulin" <tvrtko@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 12 Nov 2003 10:41:40 +0000
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Wed, 12 Nov 2003 10:16:02 GMT." <E1AJs2c-0006kA-00@xxxxxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
> ./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.

<snip> 

> > This is the script:
> > 
> > #!/bin/sh
> > 
> > name=XenoLinux
> > size=65536
> > id=$1
> > ip=$2
> > gw=192.168.200.1
> > mask=255.255.255.0
> > 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> 
<partition>

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). 

HTH. 

S.


-------------------------------------------------------
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
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>