Hello, I am trying to make a simple script which would be used to create new domain. xenctl uses data from /etc/xenctl.xml which is bad for me because The problem is with the image given to xi_build, it says: ERROR: Kernel image does not contain required signature. What is the correct procedure? Also, xi_phys_grant needs some additional params, what should I use for them? 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 -- Croadria Internet usluge <http://www.croadria.com> - Web hosting (Linux & Windows), E-commerce Podrska: <http://podrska.croadria.com> Tel: 01/4657 818, 01/4655 601 Fax: 01/4657 819 ------------------------------------------------------- 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
./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. -- Keir> > Hello, > > I am trying to make a simple script which would be used to create new domain. > xenctl uses data from /etc/xenctl.xml which is bad for me because > > The problem is with the image given to xi_build, it says: > ERROR: Kernel image does not contain required signature. > > What is the correct procedure? > > Also, xi_phys_grant needs some additional params, what should I use for them? > > 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 > > -- > Croadria Internet usluge <http://www.croadria.com> > - Web hosting (Linux & Windows), E-commerce > Podrska: <http://podrska.croadria.com> > Tel: 01/4657 818, 01/4655 601 Fax: 01/4657 819 > > > > ------------------------------------------------------- > 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@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xen-devel------------------------------------------------------- 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> ./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 $swapA 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> > ./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.Now done. -- Keir ------------------------------------------------------- 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> 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).Rather than looking in /proc/partitions you''d be better off doing an ''sfdisk -d /dev/hda'' to find out the start sector and number of sectors. /proc/partitions works in KB rather than sectors, so there are potentially odd/even problems with the start sector. Ian