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

Re: [Xen-users] Quick image creation script (encapsulated documentation

To: Jeff Blaine <jblaine@xxxxxxxxx>
Subject: Re: [Xen-users] Quick image creation script (encapsulated documentation commands)
From: Fernando Maior <fernando.souto.maior@xxxxxxxxx>
Date: Wed, 20 Apr 2005 18:48:27 -0300
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 20 Apr 2005 21:48:17 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WC9e9GQ7Y46RtioBNi5RXrAwo068d8hTnZ5/oQqvartTaRD930K1F1Y13W4zbOoGzmbj9iMuAYcws2P9se2fEgDjfBD8UzzjMRpkpEUjjdvT/36/BZUeIMmnBNDniWoid8/cgPXduqd/FOx6rRhp3y4H/msvUTw0CP9tXFbS/aM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4266BDDF.1020507@xxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4266BDDF.1020507@xxxxxxxxx>
Reply-to: Fernando Maior <fernando.souto.maior@xxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Great, Jeff!

2005/4/20, Jeff Blaine <jblaine@xxxxxxxxx>:
> I dount anyone will find this useful as they've already
> likely dealt with this by now, but just in case...
> 
> I am using it for Xen evaluation work.  It's nothing
> other than the commands from the docs, encapsulated in
> a script with an argument.
> 
> #!/bin/sh
> #
> # Where do you store your VM disk image files?
> VMROOT=/vm-images
> #
> VMPREFIX="vm-"
> #
> VMSUFFIX="-disk"
> #
> # Size of disk images in KB
> SIZE=4096
> #
> #-----------------------------------------------------------------------
> 
> VMID=$1
> 
> Usage () {
>         echo "Usage: $0 <unique-identifer>"
>         exit 1
> }
> 
> if [ "$VMID"x = "x" ]; then
>         Usage
> fi
> 
> IMAGENAME="${VMROOT}/${VMPREFIX}${VMID}${VMSUFFIX}"
> if [ -f $IMAGENAME ]; then
>         echo "ERROR: $IMAGENAME already exists."
>         exit 1
> fi
> 
> echo "Creating $IMAGENAME ..."
> echo "++ dd if=/dev/zero of=$IMAGENAME bs=1k seek=${SIZE}k count=1"
> dd if=/dev/zero of=$IMAGENAME bs=1k seek=${SIZE}k count=1
> 
> echo "echo y | mkfs -t ext3 $IMAGENAME"
> echo y | mkfs -t ext3 $IMAGENAME
> 
> echo "++ mount -o loop $IMAGENAME /mnt"
> mount -o loop $IMAGENAME /mnt
> 
> echo "++ cp -ax /{root,dev,var,etc,usr,bin,sbin,lib} /mnt"
> cp -ax /{root,dev,var,etc,usr,bin,sbin,lib} /mnt
> 
> echo "++ mkdir /mnt/{proc,sys,home,tmp}"
> mkdir /mnt/{proc,sys,home,tmp}
> 
> echo "++ umount /mnt"
> umount /mnt
> 
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
> 


-- 
Bye,
Fernando Maior
LPIC/1 31908

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

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