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

Re: [Xen-users] Ramfs


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


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:


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


Xen-users mailing list

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

Xen-users mailing list



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