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] Ramfs

Hi,

Basically this is achieved by having a temporary root filesystem deployed and deleted after the domain shuts down.
You could implement something similar like this with LVM and a root filesystem tarball:

#assuming a volume group called vg0 is available and a root filesystem /root/ubuntu.tar.gz

lvcreate -ndom1 -L5G vg0
mkfs.ext3 /dev/vg0/dom1
mkdir -e /mnt/dom1
mount /dev/vg0/dom1 /mnt/dom1
cd /mnt/dom1
tar xf /root/ubuntu.tar.gz .
cd /
umount /mnt/dom1
cat << EOF
bootloader = "/usr/lib/xen-3.2-1/bin/pygrub"
memory = 512
vcpus=2
name = "dom1"
vif = ["bridge=xenbr0"]
disk = ["phy:/dev/vg0/dom1,xvda,w"]
EOF > /root/dom1.cfg
xm create dom1.cfg

After shutdown run a script that does this:
lvremove -f /dev/vg0/dom1
rm /root/dom1.cfg

To implement something like this you need some sort of framework around Xen, most hosting providers have already built something similar for deployment. If you wanted this system to just work you can run the cleanup as a batch job after and use one time IDs for each domain (replace dom1 in the example above)

Note that for the above setup the filesystem in ubuntu.tar.gz needs to have fstab configured to use /dev/xvda as / and /boot/menu.lst with hd(0) and appropriate kernels. Lookup how to make pvgrub/pygrub domains for more information.

Hope that helps get you started.

Joseph.

On 31 August 2011 18:20, Jonathan Tripathy <jonnyt@xxxxxxxxxxx> wrote:




-----Original Message-----
From: todd.deshane.xen@xxxxxxxxx on behalf of Todd Deshane
Sent: Wed 31/08/2011 04:32
To: Jonathan Tripathy
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Ramfs

On Tue, Aug 30, 2011 at 12:47 PM, Jonathan Tripathy <jonnyt@xxxxxxxxxxx> wrote:
> Hi Everyone,
>
> Does anybody have any experience with running DomUs on Xen like Amazon EC2,
> where the filesystem goes away after reboot?
>

There are also EC2 forums available, see:

https://forums.aws.amazon.com/forum.jspa?forumID=30

-----------------------------------------------------------------------------------
But they are user forums. I wish to find technical information on how this is done with Xen

Thanks


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



--
Founder | Director | VP Research
Orion Virtualisation Solutions
 | www.orionvm.com.au | Phone: 1300 56 99 52 | Mobile: 0428 754 846

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-users] Ramfs, Joseph Glanville <=